Title: Setting up a Site ID variable
Author: joshua
Published: May 21, 2024
Last modified: November 12, 2025

---

 1. [Installation resources](https://docs.parse.ly/installation-resources/)
 2. [Installation tools](https://docs.parse.ly/installation-resources/installation-tools/)
 3. [Google Tag Manager](https://docs.parse.ly/installation-resources/installation-tools/google-tag-manager/)
 4. Setting up a Site ID variable

#  Setting up a Site ID variable

We recommend creating a Site ID variable that automatically sends traffic to your
[sandbox dashboard](https://docs.parse.ly/sandbox/) when using [GTM’s preview mode](https://support.google.com/tagmanager/answer/6107056?hl=en).
This helps keep your production dashboard free of testing data.

## Prerequisites

All you need to proceed is knowledge of:

 1. Your [Parse.ly Site ID](https://docs.parse.ly/site-id/)(s)
 2. Your Sandbox Site ID
 3.  * Usually in the form of `sandbox.sld.tld` e.g., `sandbox.example.com`
     * If you have multiple production Site IDs, your sandbox may take the form `sandbox.
       publisher-name` e.g., `sandbox.acme-inc`

## Instructions

 1. Click the **Configure** button in the _Built-In Variables_ sections on the _Variables_
    tab and select the checkbox beside **Debug Mode**.
 2. Create a _User-Defined_ variable of _Lookup Table_ type with {{Debug Mode}} as 
    the input variable. Add one line specifying when the **Input** is `true` the output
    is your sandbox site ID. You can call the variable_ parsely site id_ to use it 
    later.
 3. Set the **Default Value** to your production Site ID.
 4. Use this variable in the **Parse.ly Site ID** field in the [tracker tag](https://docs.parse.ly/installation-resources/installation-tools/google-tag-manager/setting-up-a-site-id-variable?output_format=md#next-step).

![Google Tag Manager, variable configuration screen showing an example Site ID variable.](
https://docs.parse.ly/wp-content/uploads/sites/5/2024/05/SCR-20240514-nbnw.png?w
=1024)

## Next Step

With your variable set up, you may now add it to your Parse.ly tracker for your 
[web](https://docs.parse.ly/gtm-tracking-for-web-containers/) or [AMP](https://docs.parse.ly/gtm-tracking-for-amp-containers/)
container.

Last updated: November 12, 2025