Integration: Configuring the Parse.ly tracker
To start using Parse.ly, first install the tracking code on your site. The Parse.ly tracker is a small piece of JavaScript code that monitors user actions and relays them to the Parse.ly analytics servers.
To install, add this tag to all pages you would like to track (replacing ######
with your Parse.ly site id, e.g. mysite.com
). Your Site ID is your key to Parse.ly. Most commonly, it looks like the domain of your website, but the Site ID should never include www
, http
, or https
, :
or /
.
<script id="parsely-cfg" src="//cdn.parsely.com/keys/######/p.js" async="" defer=""></script>
Add the tracker either directly to your HTML page templates or via our partner implementations: Google Tag Manager, Sitecore, Gatsby, Tealium, and Adobe Launch. Note that an integration via Segment is not currently supported. We also provide examples of how to load the tracker via JavaScript.
Are you looking to track a file that is not HTML (.pdf, .doc, .xls, etc.)? See how to Track Files.
For WordPress sites, we provide a WordPress plugin that adds both the tracking code and supported metadata automatically for you.
For any dynamically loaded content (such as infinite scroll or image galleries), you may need to configure dynamic tracking to manually send pageview events, rather than relying on the automatic pageviews of the standard tracker.
A note on staging sites and test environments
You should never include the tracker with your primary site id on staging, development, testing, or QA pages. Instead, contact support@parsely.com to get a test site id to use in those environments
Where should I place the tracker?
The Parse.ly tracker should be placed within the <body>
of the page (not in the <head>
tag). The ideal place to put the Parse.ly tracker is as the last element before the closing </body>
tag. If your website uses a template system, this is usually in the “footer” template.
Verification and troubleshooting
In most cases, customers are able to accomplish both integration steps quickly and without hassle. In order to validate your integration, we recommend the following:
- Follow the instructions here to confirm that your site is sending pageviews (or video starts if you have video tracking) to Parse.ly.
- Use our Validator tool to check both that both the tracker and metadata are correct for a particular URL.
- Log in to Parse.ly at https://dash.parsely.com// and see how the data is being received.
If you run into trouble, give the following a try:
- For metadata issues, read about how to avoid the most common metadata mistakes.
- Check out the following topics: Getting Started, Tracking, Metadata, Non-Standard Integration, Testing.
Additional integration steps
While the above two integration steps will provide you with a fully functional analytics dashboard, there are a number of further steps you may want to take to enhance your core integration, depending on your needs.
Tracking campaign data
- Parse.ly automatically tracks campaigns via supported parameters, such as UTM or ITM.
Collecting data from other platforms
- Configure tracking for Facebook Instant, Google AMP, or SmartNews.
- Configure tracking for your Android and iOS apps.
- Parse.ly also offers Apple News tracking. An account manager can provide more information on how that content is tracked in the dashboard
Collecting video/audio data from embedded players
- If you use a supported player, read the specific documentation to see if any additional scripts or configuration is necessary for Parse.ly to automatically detect video events.
- Otherwise, define a strategy for the Parse.ly tracker to discover and detect video events.
Tracking Conversions
- Understand how your content drives Conversions by tracking those events in your Parse.ly dashboard.
Customizing data collection
- Modify your tracking integration to define geographic or custom audience segments.
- Provide custom metadata (for use with the Parse.ly API or Data Pipeline).
- Add Network Syndication to understand content performance across multiple sites.
Configuring other tools
- Parse.ly Overlay: Modify your homepage markup to track slot performance via the Overlay bookmarklet.
- Get started with the Parse.ly API.
- Get started with the Parse.ly Data Pipeline.
Last updated: May 25, 2023