Posting on behalf of a customer:
"I've been trying to figure out why web activity from one of our websites (e.g https://booking.123456.com) isnt syncing with HubSpot. The purpose of this is to see who views a Booking Confirmation page, to attribute a booking to HubSpot activities.
This website is a single page application so the standard HubSpot tracking cookie doesn't work correctly.
I need to implement the tracking code in this help doc (https://developers.hubspot.com/docs/methods/tracking_code_api/tracking_code_overview#spa), however I don't fully understand certain elements.
The specific webpage I want to track looks like following- booking.123456.com/booking-confirmed/*.
Under "Set Page Path", I don't understand if the "path string" has to be placed only on the above URL only, or if the "path string" automatically updates per page.
Can you please help me understand what I need to do here, to be able to sync page views of this booking confirmation page?"
Edit to Add: What I mean by ' "path string" automatically updates per page.', is that my understanding is that the path string will not change when a new page is loaded.
This is explained here- https://developers.hubspot.com/docs/methods/tracking_code_api/set_page_path and I've attached an image of the path string I am referring to (image- 'capture').
I just want to know if someone has visited that booking confirmation page, the tracking code isn't clear for those I've spoken to internally.
- What does the code look like?
-- Does the path string update per URL change?
- Where does the code sit?
-- On every page, or just on the page we want to track?
These questions revolve around the difficulty in understanding how the tracking code functions with single page applications.