This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Adds support for Google Tag Manager to Lektor CMS

Project Description
lektor-google-tag-manager
=========================

This plugin adds support for `Google Tag
Manager <http://www.google.com/analytics/tag-manager//>` to `Lektor
CMS <https://github.com/lektor/lektor>`.

Once the plugin is enabled, a ``generate_google_tag_manager()`` function
is available to be included in target ``template`` which automatically
include Google Tag Manager code in final HTML files rendered by
``Lektor``.

Basic Usage
-----------

Enabling the Plugin
~~~~~~~~~~~~~~~~~~~

To enable the plugin add this to your project file:

.. code:: ini

[packages]
lektor-google-tag-manager = 0.1

Configuring the Plugin
~~~~~~~~~~~~~~~~~~~~~~

The plugin needs a config file with your ``Google Tag Manager`` code in
it.

Just create a file named ``google-tag-manager.ini`` into ``./configs``
folder in your Lektor project's base directory. And, put the
``GOOGLE_TAG_MANAGER_ID`` key with target property ID of form
``GTM-XXXXXX`` which you obtained from:

.. code:: ini

GOOGLE_TAG_MANAGER_ID = GTM-XXXXXX

Using in Templates
~~~~~~~~~~~~~~~~~~

Now you can add a Google Tag Manager code-snippet in your templates by
just calling the ``generate_google_tag_manager`` function in its <body></body> tag as below.

.. code:: html

<div class="gtm-script">{{ generate_google_tag_manager() }}</div>

That's it. All the ``HTML`` files that rendered from that template will
include Google Tag Manager code automatically.

License
-------

This plugin is released under the BSD license. For more information read
the `License <https://opensource.org/licenses/BSD-3-Clause>`__.

Acknowledgements
----------------

This plugin is inspired by
`lektor-google-analytics <//github.com/kmonsoor/lektor-google-analytics>`__
Release History

Release History

This version
History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
lektor_google_tag_manager-0.1-py2-none-any.whl (3.7 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jul 20, 2016
lektor-google-tag-manager-0.1.tar.gz (3.4 kB) Copy SHA256 Checksum SHA256 Source Jul 20, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting