Expand my Community achievements bar.

SOLVED

Direct Calls not working for SAP Pages

Avatar

Level 1

Hi Team,

 

I have enabled direct calls for my website, and now the pageview track calls are working when the page loads. However, for other pages under SPA, it is not working.

 

However I have added on condition in adobe Launch that pageview calls will fire only once per page. I don't want to to delete this condition but I wanted my calls to fire on every SPA pages. Please help me with the appropriate answers if any.

 

I would appreciate any help with this.

 

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @SwatiRa3 

if you are saying that you added a condition to only trigger the pageview once, yet still you want to track SPA pageviews for the individual SPA view, this will alway collide with your max frequency limitation, right?

There is no built-in exception to the max frequency condition I fear, so in your case you may have to find a workaround with maybe a second pageview rule (copy the first one) that 

  • has no max frequency
  • has a condition that checks for a certain field in the direct call's payload, identifying it as an SPA.

 

Check out this blog by Jan Exner: https://webanalyticsfordevelopers.com/2018/09/18/quick-tip-passing-data-into-launch-rules/

 

_satellite.track('pageview', {'isSPA': true});

 

and in the rule condition, you would have to check for the "isSPA" field accordingly e.g., through a custom code condition

return event.detail.isSPA === true

 

Vice versa, you will have to integrate the opposite logic as a condition into your original, non-SPA rule

return event.detail.isSPA === false

 

Hope that helps

Cheers from Switzerland!


View solution in original post

2 Replies

Avatar

Community Advisor

Hi @SwatiRa3 

 

To trigger a direct call event you must call the _satellite.track("direct call identifier") with respect to events from your website and listen to the same in adobe launch with direct call event type providing the direct call identifier from the function, there can be following reasons that your rule is not working.

  • check if _satellite.track("direct call identifier") is implemented on the on page load on your SPA pages whenever the state of the page is changing.
  • The condition you've placed might be preventing your rule to fire use _satellite.setDebug(true) on the console to enable debug mode and read the logs you'll get the issues which is preventing your rule from triggering.

Avatar

Correct answer by
Community Advisor

Hi @SwatiRa3 

if you are saying that you added a condition to only trigger the pageview once, yet still you want to track SPA pageviews for the individual SPA view, this will alway collide with your max frequency limitation, right?

There is no built-in exception to the max frequency condition I fear, so in your case you may have to find a workaround with maybe a second pageview rule (copy the first one) that 

  • has no max frequency
  • has a condition that checks for a certain field in the direct call's payload, identifying it as an SPA.

 

Check out this blog by Jan Exner: https://webanalyticsfordevelopers.com/2018/09/18/quick-tip-passing-data-into-launch-rules/

 

_satellite.track('pageview', {'isSPA': true});

 

and in the rule condition, you would have to check for the "isSPA" field accordingly e.g., through a custom code condition

return event.detail.isSPA === true

 

Vice versa, you will have to integrate the opposite logic as a condition into your original, non-SPA rule

return event.detail.isSPA === false

 

Hope that helps

Cheers from Switzerland!