0

I have two buttons with everything identical except the url. I would like to track clicks on each button separately. Any idea how I need to setup my trigger to get this to fire and track separately?

1 Answer 1

0

Trigger? I would use the same trigger for both buttons, but then in tag config, I would reference a custom JS variable in the field where I want the URL to go.

The CJS variable would look something like this:

function(){
  return {{Click Element}}.getAttribute("href");
}

Or try using the default click URL var. the default click URL var

If it doesn't work out, then add your actual html surrounding the buttons and we'll give you the actual code and selectors to use in the trigger.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.