APIs & Integrations

ChrisChiha
Top Contributor

Adding tracking codes + Visitor API to my portal

SOLVE

Hello,
 
So i recently added a chatbot on one of my "Single page application" portal, which doesn't refresh when we go from page to page. So this caused the chatbot not to work as expected. (Not hiding/unhiding as we change from page to page).
 
So now we are implemented the tracking codes to pass the page url to HS so that it hides/unhides the chatbot accordningly when the visitor navigate from page to page on the portal.
it looks something like this: "hsq.push(['setPath', { path string }])"
  
Anybody have a live samples of how this works and how can we track from HS side if the tracking is working as expected ? Is the url being passed correctly and firing as it should? is the visitor api code working? 
Can we track this from HubSpot?
Will this be tracked on contact activity level ? (Would appreciate samples and screenshots)

    
Thank you,
@ChrisChiha 

0 Upvotes
1 Accepted solution
LMeert
Solution
Guide | Platinum Partner
Guide | Platinum Partner

Adding tracking codes + Visitor API to my portal

SOLVE

Hi @ChrisChiha,

You can see the traffic data from within the reports section : Reports > Analytics Tools > Traffic Analytics.
But in your case, if it's for testing purposes, then here's an easy way to do it :

1. Create a test contact with a dummy email in your hubspot account.

2. Load the single page app

3. Fire an identify event using your dummy email -> this will link traffic on your site to the test contact.

4. Browse through all the "pages" you need to test

5. Check out the test user's activity in HubSpot

6. You should see in the activity timeline a list of all the pages that user has seen, in order.

LMeert_0-1652889629376.png

 

7. Don't forget to remove the identify event if you're done testing 🙂

 

Hope this helps !
If it does, please consider marking this answer as a solution 🙂

 

Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

View solution in original post

0 Upvotes
2 Replies 2
LMeert
Solution
Guide | Platinum Partner
Guide | Platinum Partner

Adding tracking codes + Visitor API to my portal

SOLVE

Hi @ChrisChiha,

You can see the traffic data from within the reports section : Reports > Analytics Tools > Traffic Analytics.
But in your case, if it's for testing purposes, then here's an easy way to do it :

1. Create a test contact with a dummy email in your hubspot account.

2. Load the single page app

3. Fire an identify event using your dummy email -> this will link traffic on your site to the test contact.

4. Browse through all the "pages" you need to test

5. Check out the test user's activity in HubSpot

6. You should see in the activity timeline a list of all the pages that user has seen, in order.

LMeert_0-1652889629376.png

 

7. Don't forget to remove the identify event if you're done testing 🙂

 

Hope this helps !
If it does, please consider marking this answer as a solution 🙂

 

Ludwig

Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

0 Upvotes
ChrisChiha
Top Contributor

Adding tracking codes + Visitor API to my portal

SOLVE

Thank you @LMeert for the input !