Frage

My page has a list of links, with some associated information.

eg. Something along the lines of

<div class="listOfThings">
   <div class="Thing"> <a link here/> <specific thing A info here/> </div>
   <div class="Thing"> <a link here/> <specific thing B info here/> </div>
   <div class="Thing"> <a link here/> <specific thing C info here/> </div> 
</div>

In DTM, I want to be able to track a click on to any of those inner "Thing" divs, extract which thing was clicked, and pass that info to Google Analytics. I can get the click selector working fine, but I want to know how to extract the additional information on the click.

War es hilfreich?

Lösung

This would be done inside of an Event Based rule. See image: http://imgur.com/BQv0HdC

Event Type: Click

In the element tag or selector: div.things a
This is saying I want to track all click on any anchor tag inside a div with the class name of "things"

Then once you have done that you can reference the "this" scope. You have use %% as a notation within the form fields for the GA code. so %this.text% would pull in the text of the specific link selected: %this.innnerHTML%, %this.href% etc...

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top