How can I verify I have installed the script correctly?
To ensure that Dreamdata Analytics is properly integrated and functioning on your website, you can use two methods: debugging through the web browser and utilizing the Dreamdata app's built-in debugger.
This guide will walk you through both methods.
Method 1: Browser Debugging
Step 1: Verify Script Injection
-
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.) -
Search for the Script:
- Go to the
Elements
tab. - Press
Cmd + F
(Mac) orCtrl + F
(Windows) to open the search bar. - Search for
dreamdata
to locate the Dreamdata script.
- Go to the
-
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
-
Open the Network Tab:
- Navigate to the
Network
tab in Chrome Developer Tools. - Filter the requests by selecting
Fetch/XHR
and typingdreamdata
.
- Navigate to the
-
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
-
Submit a Form:
- Fill out and submit a form on your website.
- Check the
Network
tab for new requests.
-
Inspect Requests:
- Look for
identify
andtrack
requests. - Verify that the form submission data (e.g., email, user ID) is correctly captured and sent to the Dreamdata server.
- Look for
Step 4: Advanced Debugging (Optional)
-
Set Breakpoints:
- Go to the
Sources
tab. - Set an XHR breakpoint by adding
dreamdata
.
- Go to the
-
Pause and Inspect:
- Submit a form or refresh the page.
- When the breakpoint hits, inspect the requests step-by-step.
Method 2: Dreamdata App Debugger
-
Navigate to the Debugger:
- Log in to the Dreamdata app.
- Go to
Data Platform
>Debugger
.
-
Inspect Events:
- Reset any filters to view all events.
- You will see the events (e.g., page views, form submissions) that were captured.
-
Filter Events:
- Use filters to view specific types of events like
track
,identify
, orpage
events. - Inspect the details of each event to ensure data is correctly tracked.
- Use filters to view specific types of events like