Title: Tracking code
Author: joshua
Published: August 1, 2022
Last modified: July 21, 2026

---

 1. [Installation resources](https://docs.parse.ly/installation-resources/)
 2. [Parse.ly Integration](https://docs.parse.ly/installation-resources/parsely-integration/)
 3. Tracking code

#  Tracking code

## Overview

To start the Parse.ly integration, install the tracking code on your site. The Parse.
ly tracker is a line of JavaScript that monitors user actions and relays them to
the Parse.ly analytics servers. This guide will discuss prerequisites, installation
methods, advanced configuration, testing, troubleshooting, privacy, and next steps.

![](https://docs.parse.ly/wp-content/uploads/sites/5/2025/09/image-15-1024x686.png)

Page views flowing in following the installation of the Parse.ly tracking code.

## Prerequisites & Precautions

Regardless of your installation method, you will need your [Site ID](https://docs.parse.ly/site-id/).
Parse.ly Support will provision your Site IDs following purchase. One of the Site
IDs that we will provide is for a “[Sandbox](https://docs.parse.ly/sandbox/)” Dashboard.
The Sandbox is the place that we recommend for you to send your pre-production traffic.

Anytime you make changes to your tracking code, it’s always best to use [our testing instructions](https://docs.parse.ly/test-integration/)
to verify expected results.

## Recommended Methods

We offer two methods to deploy our tracking code to all pages of your site. Both
of these methods offer unique benefits. In short, our plugin makes metadata extraction
easy and our GTM tag makes conversions and segment easy. You can use both of these
tools as long as you [take precaution to prevent double page views](https://docs.parse.ly/plugin-common-questions/#h-does-wp-parsely-support-google-tag-manager).

### The WordPress Parse.ly Plugin

Since [Parse.ly is part of WordPress VIP](https://wpvip.com/2021/02/08/parsely-acquisition-wordpress-vip/),
our dedicated plugin team continuously produces new features like [Content Intelligence](https://docs.parse.ly/plugin-content-intelligence/)
and our ability to install our plugin for WPVIP customers.

This plugin installs tracking code throughout your site and automatically injects
[metadata](https://docs.parse.ly/metadata/). It requires a single value to run, 
the Parse.ly Site ID, and you can [watch us install and operate it in less than a minute](https://www.loom.com/share/41f10041317e4e1c88b14f001e54ff6a).

To get started, review our [plugin documentation](https://docs.parse.ly/wordpress-plugin-setup/#h-installation).

### Google Tag Manager (GTM)

Many websites already have GTM running on their sites. By using our own Parse.ly
Tag Template and setting it up consistently with your other analytics, you can maximize
parity between analytics platforms. What’s more, you can even [use GTM with the aforementioned WordPress Parse.ly Plugin](https://docs.parse.ly/plugin-common-questions/#h-does-wp-parsely-support-google-tag-manager)
to gather your metadata.

If you’ve purchased [Segments](https://docs.parse.ly/audience-segments/) and [Conversions](https://docs.parse.ly/conversions/),
our tag template provides a convenient interface to tie everything together.

To get started, review our [Tag Template documentation](https://docs.parse.ly/google-tag-manager/).

## Alternative Methods

### JavaScript snippet

This is the classic way to get started. To install, add this script to all pages
you would like to track (replacing `######` with your Parse.ly Site ID). Place the
Parse.ly tracker 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.

    ```lang-html
    <script id="parsely-cfg" src="//cdn.parsely.com/keys/######/p.js" async="" defer=""></script>
    ```

### Other Tag Managers and Partners

In addition to [GTM](https://docs.parse.ly/google-tag-manager/), you may also choose
one of the following:

 * [Gatsby](https://docs.parse.ly/gatsby/)
 * [RebelMouse](https://docs.parse.ly/rebelmouse-integration/)
 * [Sitecore](https://docs.parse.ly/sitecore/)
 * [Tealium](https://docs.parse.ly/tealium/)

### More Alternatives

If nothing on this post applies to your specific situation, please review our [alternative setup methods](https://docs.parse.ly/tracking-alternative-setup-options/).

## Special Cases: Dynamic Tracking & SPAs

### Dynamic Tracking

For any dynamically loaded content (such as infinite scroll or image carousels),
you may need to configure [dynamic tracking](https://docs.parse.ly/dynamic-tracking/)
to manually send pageview events, rather than relying on the automatic pageviews
of the standard tracker. You can configure dynamic tracking to [track files](https://docs.parse.ly/track-files/)
like .pdf, .doc, .xls, etc.

### Single-Page Applications (SPA)

We’ve specialized our dynamic tracking methods to create a specialized tracker for
Single-Page Applications (SPA). If this applies to you, please review our [SPA documentation](https://docs.parse.ly/single-page-application/)
and [contact Support](https://support.parse.ly/hc/en-us) so that we may enable this
tracker for your site.

## Testing

Once you’ve installed tracking code throughout every url on your site, it’s time
to verify a proper installation. Follow [our testing instructions](https://docs.parse.ly/test-integration/)
to confirm that you are sending pageviews to us. Following a successful test, log
in to [your dashboard](https://dash.parsely.com/to/posts/?page_type=any) to confirm
that you are receiving those pageviews.

## Troubleshooting

If you have any difficulties or questions, please start with our [Troubleshooting & FAQs](https://docs.parse.ly/troubleshooting-faqs/).

## Privacy

With all this talk about tracking, take a moment to review [Privacy](https://docs.parse.ly/privacy/)
and [Cookies](https://automattic.com/cookies/) if you have any questions.

## Next steps

With tracking code deployed and tested, it’s now time to [send us your metadata](https://docs.parse.ly/metadata/).
If you’re using the WordPress Parse.ly Plugin, then you’re already done! Following
metadata configuration, you may continue to configure [other tools](https://docs.parse.ly/parsely-integration/#h-other-tools)
and integrate [additional features](https://docs.parse.ly/parsely-integration/#h-conversions)
that you’ve purchased.

Last updated: July 21, 2026