Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When there are more than 5 experiments the index used for the script is messed up. #35

Open
andrehjr opened this issue Apr 3, 2019 · 0 comments

Comments

@andrehjr
Copy link
Member

andrehjr commented Apr 3, 2019

The index on _setCustomVar cannot be greater than 5, see: https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCustomVariables

            <script type="text/javascript">
          var _gaq = _gaq || [];
          _gaq.push(["_setAccount", "UA-11223344-1"]);
          
          _gaq.push(["_setCustomVar", 4, "ab_test_four", "c", 1]);
_gaq.push(["_setCustomVar", 5, "ab_test_five", "a", 1]);
_gaq.push(["_setCustomVar", 6, "ab_test_six", "b", 1]);
_gaq.push(["_setCustomVar", 7, "button_color_on_signup", "green", 1]);
_gaq.push(["_setCustomVar", 8, "button_color_on_login", "green", 1]);
          _gaq.push(["_trackPageview"]);
          (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl.google-analytics.com/ga.js' : 'http://www.google-analytics.com/ga.js');
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
          })();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant