Tracking code API

Hey, @MW-at-mims :waving_hand: Thanks for your question. I am not an expert in this area by any means. I did a little digging through other posts for suggestions. We’ll also leave this post open in case other community members have any additional suggestions for you.

Here are a few troubleshooting steps and suggestions:

  • Inspect Network Requests: Use your browser’s developer tools to inspect the network requests being made to HubSpot. Check the payload being sent to ensure that the parameters are being passed as strings, not objects
  • Console Logs: Add console logs before sending the data to HubSpot to see how the `po` and `rpo` values are being formatted. This can help identify if they are objects or strings.

Summary:

Make sure you’re passing `po` and `rpo` as serialized strings, not objects. In the context of an SPA, use the `window._hsq.push()` method correctly to track page views on route changes, and ensure that `setPath` is using a string value for the new path.

If this doesn’t solve the issue or you need further assistance, feel free to share more details!

Have fun building! — Jaycee