Adobe Launch - SPA configuration, DCR, event driven or something else!? | Community
Skip to main content
Level 2
June 13, 2022
Solved

Adobe Launch - SPA configuration, DCR, event driven or something else!?

  • June 13, 2022
  • 3 replies
  • 1395 views

Hello,

Using Launch to Pull data from SPA can be fun at times.!

We've tried direct call rules, old DTM method and new Launch style all work fine.

We've tried data element change, works fine.

But which do you prefer? - I'd love to get a view from the community on the way forward for analytics tracking when working with react or angular.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Pablo_Childe

My personal preference is Direct call rules. I have found they are the most successful and once applied allows me and developers great flexibility and minimal triaging for breakage. There are 2 things though that need to be mentioned.

 

1 To optimally tag you need a good datalayer, if you don`t have one or try and set is dynamically via a bunch of element rules you will spend alot of extra time troubleshooting.

 

2 Most SPA once tagged forget to account for browser Back and forth buttons, so make sure devs accommodate this.

 

GLTU

3 replies

yuhuisg
Community Advisor
Community Advisor
June 13, 2022

I personally prefer Custom Events, the modern version of Direct Call. Both work in a similar manner, but Custom Events are a W3C standard that all modern browsers support natively.

 

Update:

Actually, I think I prefer an event-driven data layer, e.g. ACDL. SPAs themselves are generally driven by events, so it makes sense to tap into that for tracking too.

Pablo_Childe
Community Advisor
Pablo_ChildeCommunity AdvisorAccepted solution
Community Advisor
June 13, 2022

My personal preference is Direct call rules. I have found they are the most successful and once applied allows me and developers great flexibility and minimal triaging for breakage. There are 2 things though that need to be mentioned.

 

1 To optimally tag you need a good datalayer, if you don`t have one or try and set is dynamically via a bunch of element rules you will spend alot of extra time troubleshooting.

 

2 Most SPA once tagged forget to account for browser Back and forth buttons, so make sure devs accommodate this.

 

GLTU

Level 2
June 13, 2022

Hi, 

I couldn't agree more with you on he dataLayer comment. I'm guessing you like me have been through the pain of objects not updating in time for the call! :). I remember one install having to to have a direct call which fired another direct call but delayed for 200-300 ms... Fortunately we worked with dev to get that sorted.

But interesting we have two different views on SPA tracking.

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 13, 2022

Adding my 2 cents worth...  I also prefer the custom event method, but this is also because our site has a lot of extra dependencies that we need to ensure are completed before tracking occurs, so using custom events allows us more control on when the tracking fires (after all the bits and pieces have finished so that they can be  collected - of course we also added logic that if those pieces fail after an appropriate timeout to trigger the custom event anyway so that we don't lose tracking completely).