Question

What I've been doing: onClick="ga('send', 'event', 'category', 'action', 'label', value)"

My biggest question is adding the {'nonInteraction': 1}

What I think I should be doing: onClick="ga('send', 'event', 'category', 'action', 'label', {'nonInteraction': 1} value)"

I'm not sure if I need more commas or '!

Thanks for any help you can provide.

Was it helpful?

Solution

to make sure everything is passed correctly, I would use this syntax:

ga('set', 'nonInteraction', true);
ga('send', 'event', 'category', 'action', 'label', value);

So with the onClick event, it would be:

onClick="ga('set', 'nonInteraction', true);ga('send', 'event', 'category', 'action', 'label', value);"

Also, if you are sending event value, make sure it's an INTEGER. Otherwise, the event won't fire at all.

OTHER TIPS

So I'm assuming with {'nonInteraction': 1}, you want to treat this event as a non-interactive event which does NOT affect bounce rate. If you had {'nonInteraction': 0}, the user clicks the button/event item, and leaves the page, this would be considered a 0% bounce rate. Correct?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top