Support abstracted JavaScript event listeners in DTM event rules

Avatar

Avatar

dreisch-wiley

Avatar

dreisch-wiley

dreisch-wiley

24-06-2014

The ability to create an event-based rule based on clicks to certain elements in DTM is a huge leap for us. However, we're really limited by what is available right now, since not every scenario is listed in the "Event Type" dropdown, and we have to keep up with arbitrary changes to the front-end code to ensure that what we have set up doesn't break.

 

This idea is the proposal that, in addition to all of the current capabilities, Adobe adds the ability to create an event listener for any JavaScript event (or at least, in the same spirt of a "Data layer," an "event layer"), so that we can truly separate the concerns of firing a meaningful event and tracking that event, from our other UI code. I would imagine that either we could specify the target, or Adobe could use a specific target.

 

Use cases:

  • Where the event is triggered by an AJAX response and not a direct user interaction (for instance, a successful login in an overlay, or a share to another service), we have a way to track it
  • Where the UI's HTML is unknown, we can still give our developers a specification for alerting than an event happened so that it is trackable in the future.
  • Where the UI is subject to change, we can ensure that no matter which class names or object IDs are used in the source, meaningful events stay the same.
4 Comments (4 New)
4 Comments

Avatar

Avatar

joshd7227840

MVP

Avatar

joshd7227840

MVP

joshd7227840
MVP

24-06-2014

In general I agree that the event based rules can definitely be more robust, but FYI, you should be able to do what you want by creating a direct call rule instead.

Avatar

Avatar

dreisch-wiley

Avatar

dreisch-wiley

dreisch-wiley

29-06-2014

Thanks _josh. The documentation was very sparse to this effect. Event-based rules are certainly an improvement over baked-in variable definition and s.tl() calls, but I'm still seeing two major dependencies:

 

The _satellite Object needs to be defined

The UI needs to fire rules specifically to _satellite

 

This still means that we need to bake _satellite reference into our UI code, insufficiently abstracting concerns... it will still be a hell of a lot of work getting it in, and it's no longer dependency-proof and future-proof. Plus, for measuring third-party applications that we include on our pages, we have no option here. We can't ask third parties to integrate directly with Adobe, but we can ask some key partners for something more abstract.

 

AddThis, for instance, fires this event:

http://support.addthis.com/customer/portal/articles/1365497-addthis-javascript-events

 

(Ignore IE8 unfriendly example code on that page for a second and consider the events.) We still need a custom plugin, then, to listen for these events and then map them to direct call rules. Sort of eliminates the whole point of having those rules.

Avatar

Avatar

joshd7227840

MVP

Avatar

joshd7227840

MVP

joshd7227840
MVP

29-08-2014

I definitely agree with you danielle_wiley; ideally I too would like to see something more generic/universal.  I was just pointing out direct call rules as a potential short term solution for you Smiley Happy 

 

.josh

Avatar

Avatar

dreisch-wiley

Avatar

dreisch-wiley

dreisch-wiley

11-09-2015

It was never marked as such, but the DTM team did finally release something to this effect.