Skip to content

Google Tag Manager: Set up Parse.ly tracking


Parse.ly offers Google Tag Manager integrations for standard web containers and AMP containers.

For Web containers

Parse.ly provides a single tag template designed to make it easy to integrate tracking onto your website. You can install the tracker, define custom audience segments, configure conversion event tracking, and dynamically track pageviews all from within your current Google Tag Manager (GTM) container.

Adding the template

You can find the Parse.ly tag template in Google’s Community Template Gallery. To add the template to your GTM container, click the Add to workspace button in the top right of the tag template page.

You can also add the tag template from within your GTM container:

  1. Navigate to the Templates section on the left.
  2. In the Tag Templates section, click the Search Gallery button.
  3. Search for “Parse.ly” and click on the tag you want to add to your container.
  4. Click the Add to workspace button.

Using the template

There are three types of functionality within the Parse.ly tag template:

  1. Install the tracker (with custom audience segment data).
  2. Fire self-managed conversion events.
  3. Fire dynamic tracking pageviews.

You can choose the type of tag you want to use from the Tag type dropdown:

Tracker

Use the Tracker tag type to add the Parse.ly tracker to your site. You can include custom audience segment data within this tag.

  1. Add your Parse.ly Site ID to the Parse.ly Site ID field.
  2. (Optional) If you have custom audience segment data you would like to provide, expand the Custom Audience Segments section and add the appropriate key-value pairs. You can add multiple key-value pairs by clicking the Add Row button.
    • Once implemented, reach out via your integration project or to support@parsely.com to build the segments into your dashboard.
  3. (Optional) If you don’t want to send a pageview when the Parse.ly tracker loads, expand the Additional features section and click the Disable autotracking checkbox. You may want to do this if your site is a single-page application and you want to manually trigger pageviews with our dynamic tracking tag instead of Parse.ly’s built-in SPA tracking.
  4. Click in the Triggering section and select the trigger you wish to use for this tag. A good rule of thumb: use the same trigger(s) you already have configured for Google Analytics or other trackers. Otherwise, just choose the standard All Pages trigger.
  5. Give the tag a descriptive name and click Save, and then publish your container.

The Parse.ly tracker will now deploy through Google Tag Manager on your site. You can validate your integration using your browser’s network tab to see the pageview events firing and validate the custom audience segment data in those events.

Important note for customers upgrading from a previous version of the template

You may need to manually re-enter your Parse.ly site ID and segment data in the Parse.ly tag before deploying the update to production.

Note on custom audience segment data

Every unique value you want to track must be defined with a segment because Parse.ly cannot support wildcards. For example, you might have a GTM variable capturing ID values of your subscribers. Instead of passing the ID value directly, you should create a secondary variable that takes the ID as input and outputs true or false and use that variable for the field. This can be done with a Regex Table, Lookup Table, or Custom JavaScript variable.

Conversion tracking

Use the Conversion tracking tag type to send conversion events using any of GTM’s default or custom triggers.

  1. Select one of the five available conversion types for the action: Subscription, Newsletter Signup, Lead Capture, Link Click, or Purchase.
  2. Enter a conversion label that describes the action. You can assign a variable to this field to make the field dynamic based on the action, but this value should not be unique to a single interaction. Otherwise, the Parse.ly dashboard will not be able to aggregate data in a helpful manner.
  3. Click in the Triggering section and select the trigger you wish to use for this tag. If you are tracking an action that is already being tracked in your Google Analytics setup, we recommend using the same trigger to ensure consistency between platforms.
    • Note that the Parse.ly tracker must be loaded on the page before the conversion tag fires. If you are using the same trigger for the tracker tag, make sure to use tag sequencing to ensure the tracker loads first.

Forward slashes (/) are not supported in conversion labels. If used, the conversion details page for those labels will be inaccessible.

  1. Give the tag a descriptive name, click Save, and then publish your container.

You can still use the conversion tracking tag if you have installed the Parse.ly track via another method, however, the Parse.ly tracker needs to be loaded on the page before triggering a conversion event.

You can validate your integration using the network tab of your browser to see the conversion events firing as you interact with the tracked elements.

Dynamic tracking

Use the Dynamic tracking tag to manually fire a pageview event at any time after the Parse.ly tracker has been loaded onto the page. This is a great solution if you want to track image slideshows within an article or dynamic content, like infinite scroll.

  1. In the Page URL field, choose the variable you would like to pass as the URL for the page viewed.
  2. In the Referring URL field, choose the variable you would like to pass as the referring URL to the page viewed.
  3. Click in the Triggering section and select the trigger you wish to use for this tag. If you have a pre-built trigger for Google Analytics virtual pageviews, we recommend using the same trigger to ensure consistency between platforms.
  4. Give the tag a descriptive name and click Save, and then publish your container.

You can validate your integration using your browser’s network tab to see the pageview events firing.

Notes

For AMP containers

Parse.ly has partnered with Google to provide a tag to load the Parse.ly component on Accelerated Mobile Pages (AMP).

  1. Navigate to the “Tags” section of your Google Tag Manager workspace.
  2. Click “New”.
  3. From “Tag Configuration” choose the Parse.ly tag from the “More” section (or search for the Parse.ly tag).
  4. Add your Parse.ly Site ID to the Parse.ly API Key field.
  5. Check the box next to Get Client ID from AMP document or cookie.
  6. Click in the Triggering section and select the trigger you wish to use for this tag. A good rule of thumb: use the same trigger(s) you already have configured for Google Analytics or other trackers. Otherwise, just choose the standard All Pages trigger.
  7. Name and save the tag and publish your container.

The Parse.ly AMP component will now deploy through Google Tag Manager to your AMP pages.

Last updated: January 29, 2024