We have a single page application using hash routing and we can’t remove the hash from the URL at this time.
There are a couple of issues currently.
Note: disregard the “,” in my URL examples. As a new user I’m not allowed to submit a post with more than 2 links.
1. The Hubspot emails are adding the tracking query string before the hash in our URL rather than adding it to the end of the URL.
Example:
a. The link is getting generated as - website,com/homepage/?utm_campaign=foo&utm_source=bar#/
b. The link should be - website,com/homepage/#/?utm_campaign=foo&utm_source=bar
c. From what we can tell, it’s more of a cosmetic issue, but we’re looking into if it affects any of our other third party tracking and we’d like to resolve it regardless, if possible.
2. We’re trying to do some abandon order/order complete workflows based on what pages the customer views, but Hubspot won’t recognize page view events in the workflow due to the hash route.
The page view will show up in the contact activity history, but the hash routing we’re using is somehow failing to allow “page view” triggers in workflow. The only URL I can make work for page view trigger in a workflow is the home page (probably because all other pages have their path after the hash).
Example:
If the URL is website,com/homepage/#/order-details
a. I can trigger something with “Contact has viewed a URL containing website,com/homepage”
b. But I can’t trigger something with “Contact has viewed a URL containing /order-details” (even though the contact activity history shows I viewed that page)
We have some ideas for possible workarounds, but I was wondering if anyone had thoughts on if these would work.
1. Solution idea for query string
During the page load, Would there be any issue will nulling out the query string values AFTER the hubspot scripts have run?
Our thought is that it’s ok to strip out the Hubspot query string after all the scripts have run, but we’d like some confirmation that it won’t break anything.
2. Solution idea for page view triggers in a workflow
We aren’t doing anything special in the hubspot scripts to track page view events that we can tie directly to a user, but I’m thinking there might be a way to do this so I was hoping for some guidance any any functions we should look into?
Would these three work for what we need to trigger page view in workflows?
Set Page Path - developers.hubspot.com/docs/methods/tracking_code_api/set_page_path
Track Page View - developers.hubspot.com/docs/methods/tracking_code_api/track_page_view
Identify visitor - developers.hubspot,com/docs/methods/tracking_code_api/identify_visitor
Any thoughts or insight would be much appreciated! Thanks!
