This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This plugin adds support for Google analytics to Lektor CMS.

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

Basic Usage

Enabling the Plugin

To enable the plugin add this to your project file:

[packages]
lektor-google-analytics = 0.1

Configuring the Plugin

The plugin needs a config file with your Google analytics code in it.

Just create a file named google-analytics.ini into ./configs folder in your Lektor project’s base directory. And, put the GOOGLE_ANALYTICS_ID key with target property ID of form UA-XXXXXXXX-Y which you obtained from:

GOOGLE_ANALYTICS_ID = UA-XXXXXXXX-Y

Using in Templates

Now you can add a Google analytics code-snippet in your templates by just calling the generate_google_analytics function inside its <body> </body> tags.

<div class="ga-script">{{ generate_google_analytics() }}</div>

That’s it. All the HTML files that rendered from that template will include Google-Analytics code automatically.

Advanced

You can use GOOGLE_ANALYTICS_PROPERTY property to include your
custom-built Google Analytics tracking code. In that case, your ./configs/google-analytics.ini will look like this:
GOOGLE_ANALYTICS_ID = UA-XXXXXXXX-Y
GOOGLE_ANALYTICS_PROPERTY = 'my custom code'

Don’t use this property unless you know what are you doing. By default, it is set to auto.

To go deeper than this, please refer to Google-Analytics documentation.


Copyright (c) 2015, Khaled Monsoor

All rights reserved.

Licensed under BSD license.

Release History

Release History

0.1.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
lektor_google_analytics-0.1.3-py2-none-any.whl (5.4 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jan 2, 2016
lektor-google-analytics-0.1.3.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source Jan 2, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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