Skip to main content

Testing Your Tracking

This article will walk you through how to test that you've added the script correctly. You can use the following three methods to do this: using our tracking chrome extension, debugging through the web browser, or using the Dreamdata app's built-in debugger. Note that only the debugger, Method 3, can be used to test Server-Side Tracking because of where it sends events.

The first two methods will work only for events sent via your site. So you won't be able to test events sent with other methods, such as from Zapier, here.

Method 1: Dreamdata Tracking Validator

This is a tool that makes it easier to find which events are being sent to dreamdata. You can download the chrome extension via this link. The extension is not part of the Dreamdata product but is an extra free tool that we offer to help you test your tracking set up.

What to Look For

These are the event types as displayed in the Tracking Validator.

The “Normal” script firing will show a page view: NormalScript

The “Cookieless” script will have a blue tag. This should fire when the page is first opened, and for page views after cookies are rejected: Cookieless

The track and Identify event should show up when a form is submitted: form-submit

Expected behavior

  1. Upon loading the cookieless script is fired.
  2. If cookes are accepted:
    • The normal script is now fired.
    • As the user navigates to new pages the normal script is fired.
    • For form tracking, we expect to see a form event along with an identify event.
  3. If cookes are denied:
    • As the user navigates only the cookieless script is fired.
    • If they fill in a form this is not tracked. In all cases the anonymous id should match between events so that these can be linked to a single person in Dreamdata.

Common Issues

Page view does not trigger when cookies are accepted.

This is what it should look like when a user accepts cookies: cookies-accepted

An incorrect set up is when only the cookieless event is showing after cookies have been accepted. When this happens the traffic will be counted as direct for the next page clicked. To make sure the customer journey is complete, adjust your set-up so that the normal script fires when cookies are accepted. You can do this by adding a trigger for after the user responds to the cookie banner. The specific set-ip will differ from site to site.

Method 2: Browser Debugging

Step 1: Verify Script Injection

  1. Open Chrome Developer Tools: Right-click on your webpage and select Inspect. This will open the Chrome Developer Tools. (This applies to other browsers as well.)

  2. Search for the Script:

    • Go to the Elements tab.
    • Press Cmd + F (Mac) or Ctrl + F (Windows) to open the search bar.
    • Search for dreamdata to locate the Dreamdata script.
  3. Check Script and Write Key:

    • Ensure the script is correctly injected into the page.
    • Verify that the writeKey in the script matches the one provided by Dreamdata.

Step 2: Verify Event Tracking

  1. Open the Network Tab:

    • Navigate to the Network tab in Chrome Developer Tools.
    • Filter the requests by selecting Fetch/XHR and typing dreamdata.
  2. Check Requests:

    • Refresh the page and look for requests to the Dreamdata server.
    • Click on the requests to inspect the payload and ensure the correct data (e.g., writeKey, userKey, anonymousId) is being sent.

Step 3: Verify Form Tracking

  1. Submit a Form:

    • Fill out and submit a form on your website.
    • Check the Network tab for new requests.
  2. Inspect Requests:

    • Look for identify and track requests.
    • Verify that the form submission data (e.g., email, user ID) is correctly captured and sent to the Dreamdata server.

Step 4: Advanced Debugging (Optional)

  1. Set Breakpoints:

    • Go to the Sources tab.
    • Set an XHR breakpoint by adding dreamdata.
  2. Pause and Inspect:

    • Submit a form or refresh the page.
    • When the breakpoint hits, inspect the requests step-by-step.

Method 3: Dreamdata App Debugger

  1. Navigate to the Debugger:

    • Log in to the Dreamdata app.
    • Go to Data Platform > Debugger.
  2. Inspect Events:

    • Reset any filters to view all events.
    • You will see the events (e.g., page views, form submissions) that were captured.
  3. Filter Events:

    • Use filters to view specific types of events like track, identify, or page events.
    • Inspect the details of each event to ensure data is correctly tracked.

This video guide covers Method 2 and 3.

Verifying Dreamdata Analytics Setup