Track pageviews using the API

TShemesh
Member

Hi, 
We're trying to track pageviews for a flow in our SPA platform.
Using the embed code, we get pageviews from our marketing site.

Going into our platform, we use the API to track a flow.
We can see the tracking pixel going out (in the network tab of google developer tools) but we can't get to see them in HubSpot.

How can we debug it or understand why we can't see those pageviews?

6 Replies 6
himanshurauthan
Recognized Expert | Platinum Partner

Hi @TShemesh,

 

As mentioned here - https://knowledge.hubspot.com/reports/how-do-i-know-if-my-hubspot-tracking-code-is-working. If the HubSpot tracking code is firing on your website pages, but you do not see any new page views or sessions on your dashboard or in the sources report, you may need to change your target domain or add additional domains to your tracking code settings to make sure that HubSpot is gathering analytics from the correct domain or subdomain. 

 

Hope this helps!

 

Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology
TShemesh
Member

Hi himanshurauthan, 
Thanks for your response.

The Domain is in the list and yet we can't see the tracking events 😒

0 Upvotes
himanshurauthan
Recognized Expert | Platinum Partner

Hi @TShemesh,

 

So as you said - Going into our platform, we use the API to track a flow.

 

Is it possible to share the code that you are using to track and specific reasons why you aren't using the tracking pixel in the platform too?

 

Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology
TShemesh
Member

Hi @himanshurauthan
I do use the tracking pixel but I need to add a code for the pages as this is an SPA application.
this is the code in the Google Tag Manager:

<script>
var _hsq = window._hsq = window._hsq || [];
_hsq.push(['setPath', '{{Page Path}}']);
_hsq.push(['trackPageView']);
</script>

 
I do see the request going out for the HubSpot server.

0 Upvotes
TShemesh
Member

Hi @himanshurauthan
I found out the issue is with the parameters in the pixel.
The difference between the working and the not working is in:
vi, nc, u,b and cc parameters. 

By coping them from the working request to the not working request. I succeeded to see the event in the users "page views" 

Now, I just need to understand what are those params and why are they different 

himanshurauthan
Recognized Expert | Platinum Partner

Glad that this works for you @TShemesh!

 

Can you please share, what you copied and how you used those params?

 

Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology