Skip to main content

User metadata to be used with Molo.

Project description

Continuous Integration Code Coverage

Provides code to help with User metadata in a project using the Molo code base.

Installation:

pip install molo.usermetadata

In your app settings:

INSTALLED_APPS = (
   'molo.usermetadata',
)

MIDDLEWARE = (
   'molo.usermetadata.middleware.PeronsaMiddleware'
)

In your app urls.py:

urlpatterns += patterns('',
     url(r'^meta/', include('molo.usermetadata.urls', namespace='molo.usermetadata', app_name='molo.usermetadata')),
)

Note:

In order for the personae to be activated, choose activate under wagtail settings > personae settings

Google Analytics

In order for GA to pick up persona data you need to add the following to your base.html

At the top of the template you need to load the persona tag:

{% load persona_tags %}

In your GTM block add the following to get the persona value:

{% persona_selected as persona_selected_value %}

In your <noscript> tag add the following to src in order to add the persona to the data layer when JS is not enabled:

{% if persona_selected_value%}&persona={{ persona_selected_value }}&event=persona{% endif %}

At the bottom of your tag manager block add the following in order to add the persona to the data layer when JS is enabled:

{% if persona_selected_value %}
  <script type="text/javascript">
    dataLayer.push({'persona': '{{ persona_selected_value }}', 'event': 'persona'});
  </script>
{% endif %}

Project details


Download files

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

Source Distribution

molo.usermetadata-6.0.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

molo.usermetadata-6.0.0-py2-none-any.whl (13.0 kB view details)

Uploaded Python 2

File details

Details for the file molo.usermetadata-6.0.0.tar.gz.

File metadata

File hashes

Hashes for molo.usermetadata-6.0.0.tar.gz
Algorithm Hash digest
SHA256 8600590e87b90b8c173934b035f180d74809737fd63db012d056b5491259c5da
MD5 81a6da93101a2c930a2a2c7c5550a261
BLAKE2b-256 ef869d5b72a7c0ca19336c17af2f730385d60df73093faddedc758deb69e0143

See more details on using hashes here.

File details

Details for the file molo.usermetadata-6.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for molo.usermetadata-6.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 1eaf1e92636f46751686e8b0a21802396bd840de5fc6bee6bd1711f016550d54
MD5 7f69be1a77db423da413f55aff095176
BLAKE2b-256 d89aeb3289608c93d53a66fb20fd83eb7119d899c71c25be88ac5f85c6d9e7e4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page