Expand my Community achievements bar.

Webinar: Adobe Customer Journey Analytics Product Innovations: A Quarterly Overview. Come learn for the Adobe Analytics Product team who will be covering AJO reporting, Graph-based Stitching, guided analysis for CJA, and more!

direct call vs click

Avatar

Level 1

Why is direct call preferred over click rule??

2 Replies

Avatar

Community Advisor

While using a tag management system (TMS) like Adobe Launch, you can use different tagging methodologies to achieve your requirements. There are 3 main concepts of tagging which are:

  • DOM scraping which uses the functionalities of the DOM API to gather the data from the web pages. While it is a fast and flexible approach, it is also fragile as any changes in the DOM can break your implementation without notice.
  • Direct Call Rule which involves calling the rule/tag directly from your platform code. This approach is less flexible than the DOM scraping one. It is more robust and allows you to streamline your implementation. One of the main issues with DCR implementation is that in most instances there is no defined data structure and it also requires you to use the reference to the TMS object in your platform source code which will become a huge technical debt.
  • Data Layer which allows you to define a JavaScript object which will contain a structured version of the data you need to collect. While it is in the same spirit as the DCR implementation, it has the benefits to not make any reference to the TMS object which removes the technical debt issue. You can also define a well structured object to meet all of your tagging needs.

Based on this:

  • I would not advise using DCR to track any type of interaction on your site. Once it is implemented at the platform level it will be difficult to change if needed and you will have to wait on your developer development cycle to make any changes
  • Using the event listeners or using Adobe Launch build in capability to use an event configured to listen for a click on a DOM element can be used but it means that for each click interaction you might have to create a new rule
  • Data layer approach would be best. If you check this article: https://dev.to/alcazes/generic-data-layer-1i90 and looks at events section and this should give you an idea on how it can be implemented. This approach would be the preferred approach as it would allows you to create potentially one rule as you will only look for one target/phase. Also it will add a layer of data quality as you would always expect the values to be specified the event object

Avatar

Community Advisor

Because some people had been working on the older DTM, where rules were triggered usually with a Page Bottom event or a Direct Call, and those people have carried over their habits to Launch.

DTM also allowed for triggering off some browser events, including clicks, but people just tended to avoid using them (I think because the interface wasn't intuitive).