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

Supporting key-value pairs for amp-analytics to work with Google Analytics #4798

Closed
jlaurito opened this issue Aug 31, 2016 · 2 comments
Closed

Comments

@jlaurito
Copy link

(note: while this sounds similar to #1701 it is a different issue)

amp-experiments supports human-readable experiment and variable names. Unfortunately, most A/B testing frameworks, including Google Experiments/Google Analytics, don't allow for human readable experiment & variable names.

Specifically, Google Experiments requires a 0-indexed integer as an experiment id (xvar). So to get amp-experiments to pass events to Google Experiments, each variant needs to be named a 0-indexed integer instead of human-readable names. So instead of

"variants": { "yellow": 50, "green": 50 }

I need

"variants": { "0": 50, "1": 50 }

If amp-analytics supported some mapping, ie {"yellow":0,"green":0} in extraUrlParams, we could retain human-readability in experiments and pass machine-readable params to Google Experiments.

@lannka
Copy link
Contributor

lannka commented Sep 15, 2016

This is a tricky problem.

Say if a page wants to incorporate 2 analytics platforms that have contradictory naming constraints:
A needs a number but B needs alphabetic string. Obviously no matter how you name your variants, one of them will fail.

@rudygalfi do you have any idea? We have to introduce a mapping, but I don't know where.

@rudygalfi
Copy link
Contributor

Since we haven't acted on this in awhile, I'm going to close.

Please re-open if anyone is interested to continue discuss adding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants