Code Monkey home page Code Monkey logo

lalatgithub / python-google-tag-manager Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 10 KB

Create javascript snippet code for your Google Tag Manager by providing your Site Name, Site URL and Google Analytics Tracking code. This project creates Universal Analytics Tag so Tracking Code format must be like UA-xxxxxx-xx

Python 100.00%
universal-analytics google-analytics google-tag-manager google-tag-manager-python-api google-analytics-python-api analytics-api analytics-tracking

python-google-tag-manager's Introduction

Create javascript snippet code for your Google Tag Manager by providing your Site Name, Site URL and Google Analytics Tracking code. This project creates Universal Analytics Tag so Tracking Code format must be like UA-xxxxxx-xx


##### Enable Google Tag Manager API [Enable Google Tag Manager API](https://console.developers.google.com/start/api?id=tagmanager&credential=client_key)
##### Make required changes in settings.py ```python # enable/disable sending javascript code snippet in email. SEND_CODE_SNIPPET_EMAIL = True

SMPT settings goes here...

secret key must be in /secrets/ folder. otherwise change directory here

How to get secret key JSON file. Follow link

GOOGLE_DEVELOPER_SECRET_KEY = os.path.join('secrets', 'google_developer_secret.json')

TIME_ZONE_COUNTRY_ID = 'US' TIME_ZONE_ID = 'America/Los_Angeles'

possible values: web, android, ios

GOOGLE_TAG_USAGE_CONTEXT = ['web']


<br/>
##### Switch to project root directory and Install dependencies from requirements.txt file

pip install -r requirements.txt


<br/>
##### What command do i need to execute?

simply run from the command line

python index.py --site_name MY_SITE_NAME --site_url MY_SITE_URL --tracking_id MY_ANALYTICS_TRACKING_CODE


<br/>
##### What do you get?
![Google Tag Manager Preview](http://i.imgur.com/nV4CFVl.png)

<br/>
##### Tested Environment

Python 2.7 Python 3.4 Google Tag Manager API Version 1 Ubuntu 14.04


python-google-tag-manager's People

Contributors

lalatgithub avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

oussama4920

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.