Question

Events for API-created pages are not being captured.

  • 4 February 2024
  • 4 replies
  • 37 views

Since some of the URLs I want to track contain query parameters, I am using the FullStory setVars API to send custom page data to FullStory (https://help.fullstory.com/hc/en-us/articles/1500004101581-FS-setVars-API-Sending-custom-page-data-to-FullStory?source=search). Although I can see the pages created through the API in the FullStory Pages UI, the events I create for these specific pages are not being tracked (they remain at 0 events). Additionally, I have observed an "Once set, page names cannot be changed" API error in the UI, which I don't fully understand.

I’m calling the API everytime the URL change (in order to be able to track click events to the specific pages I created). I’m calling it like below:
 

// inside `const onChangeSelectedItem = (index: number)`
FullStory('setProperties', {
type: 'page',
properties: {
pageName: dashboardIds[analyticsTabsEnum[market.toString()]][index].fullStoryName
},
})


What am I doing wrong?

Note: FullStory is correctly set up, as we have been using it for a while now and observing events for non-custom pages.


4 replies

Userlevel 1
Badge

Hello @LucasRotsenViridios 

Thanks for reaching out! Setting the Page Names and creating Events are usually done via two different API calls, so I’m not sure if you’re trying to send an event or update an existing page name. I can see you are already in contact with our support team for a query relating to pages so hopefully we’ll be able to get some more details so we can take a closer look.

If there’s anything you want to add to this post on our community, please reply but it sounds like we may need to take a closer look at your account to troubleshoot further :-)

Hi @Gemma,
Thank you for your response.

What I didn’t understand correctly is when should I call the API with the `type = ‘page’` as below:

FullStory('setProperties', {
type: 'page',
properties: {
pageName: dashboardIds[analyticsTabsEnum[market.toString()]][index].fullStoryName
},
})

 

Should it be done once (outside of my application) or every time a specific page is loaded?

What I want is to be able to track the time spent on each of these custom pages I create via API, but when I create events for those custom pages, they are not being tracked at all. See an example below:

Custom page showing in the UI:
 



Event created for when the custom page is visited:


Activity tracked for this event:
 


Pages I want to track:
 


I hope this added information helps in understanding what I’m trying to achieve.

Thank you again.

Userlevel 1
Badge

Hey @LucasRotsenViridios ! As we noted in the ticket you created, we’re going to follow-up there with further instructions. Thanks for your patience as we dig into this further.

Userlevel 1
Badge

Hi @LucasRotsenViridios 

We have replied to you via your support ticket with a more complete answer but we wanted to make sure anyone else who comes across this thread could find some of the advice we provided.

To clarify with Pages and query params:

  • If only the query params change, but the page reloads, there would be a new "pageview". In this scenario you would be able to use the FS.setVars() and page names to distinguish these pages.

  • If only the query params change, and the page does not reload, you could use the pagevar api with non-page-name page vars to distinguish them. Note that this can get misleading when looking for Heatmaps, and will not enable Journeys.

For example, if you call:

FS.setVars('page',{
pageName: 'Same Page Name',
custom_param_str: 'some value',
custom_param_int: 34
});

you would use your properties to refine the filters in a search.

Hopefully this helps you adjust your API calls to get things moving in the right direction but if you need any further help, please respond to us via the support ticket and we will be here to assist :-)

Gemma

Reply