Live now- Turn off page tracking

Hi Fellow Devs :slight_smile:
We have implemented web messaging via GTM and are using tags to identify which pages our customers are navigating to. Works fine when it fires the page view command however the issue is that on the live now view, every time the customer clicks around on the page, it reverts back to the default page title.

For example, we have a start page.
Customer clicks on the 'contact us' which GTM sends a pageview tag.
On live now we see this updating but if the customer clicks on something else on the page, like a drop-down box or something that triggers the url to change.
Live now shows that the customer is back on the home page even if they are really still on the 'contact us' page.

Is there a way to disable the auto url page tracking? We would much prefer to use using the commands for every page

Hi @Tony_Nguyen we would need to better understand what happens on your page when "the customer clicks on something else on the page, like a drop-down box or something that triggers the url to change": do you have a more detailed description? Unclear what happens exactly after the click: does the URL change, and is there a page-reload?
Are you building a Single Page App (SPA)?

Hi @Tony_Nguyen . Yes, if you would like to use Journey plugin commands to precisely control when and how your page views are tracked, there exists a method to do that, however currently this can only be achieved by using our Public REST APIs, as the relevant admin UI setting isn't implemented yet. We are working on making it available in the future.

Please refer to this page for a list of our APIs and what contract request and response bodies to expect:

Two APIs would be useful for making this change:

  • GET /api/v2/webdeployments/configurations/{configurationId}/versions/draft
  • PUT /api/v2/webdeployments/configurations/{configurationId}/versions/draft

The setting can be found under journeyEvents and it is called pageviewConfig. It has three values:

  • Auto - page views are sent automatically, when our tracker detects URL change
  • Once - only a single page view is sent, soon after our plugin initialises, so this happens once per page load
  • Off - no page views are being sent automatically and we would expect for Website Admin to call Journey.pageview command in their scripts to send page views

The GET /versions/draft API request can be used to obtain the full body of the configuration in question. You can then edit the configuration in your text editor and use it as a request body for the PUT /versions/draft API request. The relevant part of the configuration would look like this for example:

  "journeyEvents": {
    "pageviewConfig": "Off",
    "enabled": true
  }

Once the PUT request succeeds, this should then update the configuration draft. You would go into Messenger Configurations section in Genesys Cloud Admin and publish new version from the draft you edited. This version would then be available to be assigned to one of your Messenger Deployments.

Any subsequent edits of this configuration done using available Genesys Cloud Admin UI should retain the value for pageviewConfig setting, so you should be free to edit it beyond this point.

Thanks @Michal_Krzywonos
This is exactly what we needed!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.