Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
altf1be-google-analytics-helpers
Advanced tools
Google Analytics helpers facilitating the setting of the categories, actions, labels, User Id and User Agents built by www.alt-f1.be
Helpers for Google Analytics facilitating the setting of the categories, actions, labels, User Id and User Agents.
See https://bitbucket.org/altf1be/altf1be_google_analytics_helpers
Google Analytics: https://analytics.google.com
Author: Abdelkrim BOUJRAF, http://www.alt-f1.be
export COM_GOOGLE_ANALYTICS_TRACKING_ID=G-XXXXXXXXXX
pip install python-dotenv
from dotenv import load_dotenv
load_dotenv()
from altf1be_google_analytics_helpers import GoogleAnalytics
import requests
googleAnalytics = GoogleAnalytics()
USER_ID: int, 0 if you DO NOT store a user_id
googleAnalytics.track_event(
category="set a category",
action="set an action",
label="set a label",
value=0, # Event value, must be an integer. i.e. the value of a basket
ua=request.headers.get("User-Agent"),
)
install the package on pypi.org :
pip install altf1be_google_analytics_helpers
pip install altf1be_google_analytics_helpers --upgrade
install the package on test.pypi.org :
pip install -i https://test.pypi.org/simple/altf1be_google_analytics_helpers
pip install -i https://test.pypi.org/simple/altf1be_google_analytics_helpers --upgrade
build the setup.py
python3 setup.py sdist bdist_wheel
python3 -m pip install --user --upgrade twine --use-feature=2020-resolver
upload the library on TEST pypi.org
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
upload the library on PROD pypi.org
python -m twine upload dist/*
Copyright (c) ALT-F1 SPRL, Abdelkrim BOUJRAF. All rights reserved.
Licensed under the EUPL License, Version 1.2.
See LICENSE in the project root for license information.
FAQs
Google Analytics helpers facilitating the setting of the categories, actions, labels, User Id and User Agents built by www.alt-f1.be
We found that altf1be-google-analytics-helpers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.