Mobile app version of vmapp.org
Login or Join
Nimeshi995

: Text limit on analytics event code I am just about to add the event code a button that downloads the PDF. Event code fields: _trackEvent(category, action, opt_label, opt_value, opt_noninteraction)

@Nimeshi995

Posted in: #Analytics #Button #Javascript

I am just about to add the event code a button that downloads the PDF.

Event code fields:

_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)


Example of event code:

onClick="_gaq.push(['_trackEvent', 'Videos', 'Play', 'Baby's First Birthday']);"


I was just wondering if anyone knows if there is a text limit on the opt_value?

Do you think the following would be too long 'Elmhurst School says IPC has made all the difference'?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

opt_value should actually be an integer not a string. Although other char limit answers apply to the string values. e.g. action, opt_label.

10% popularity Vote Up Vote Down


 

@Si4351233

Google's event tracking guide doesn't list a limit on those fields code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html
A blog post suggests its 46 characters which may also be the limit for event tracking variables www.testically.org/2011/11/22/google-analytics-_setcustomvar-values-have-a-character-limit/
This will work:

_gaq.push(['_setCustomVar', 1, 'var_key', '1234567890123456789012345678901234567890123456', 3]);


While this doesn’t:

_gaq.push(['_setCustomVar', 1, 'var_key', '12345678901234567890123456789012345678901234567890', 3]);

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme