nuxt-community / google-optimize-module

SSR friendly Google Optimize module for Nuxt.js
MIT License
215 stars 32 forks source link

Missing Features #26

Open hecktarzuli opened 4 years ago

hecktarzuli commented 4 years ago

a) Robots - It's critical that spiders/bots get assigned the original version of the experiment so no unintended side effects occur. I propose a regex to match against user agent with a default that includes 'spider', 'bot' etc.. It can be disabled.

b) Emit Assignment Function - Since there are so many edge cases that would negate the initial window.ga push, a helper function should be exposed that would run the window.ga push again whenever you want.

c) Get Optimize Value Function - To help make this lib more useful outside of Vue Analytics, a helper function or $exp.prop should be exposed that gets the value of the Optimize token (uePZO471S-6qGUwbeUyw_Q.1 for example). This would make this lib much more helpful in GTM as well.

d) Ability to Disable Auto-Assign Reporting - There are cases when you don't want the assignment on first page hit. Specifically when you are looking at people hitting a certain page type you don't want to tell Optimize/GA about it as your results would be diluted with people that may have never seen the experiment. This should be optional.

If these are acceptable, I wouldn't mind making a pull req, but before I spent time on it I wanted to make sure the Nuxt gang was on board since this lib doesn't seem to be getting any updates besides dep bumps.

@pi0 @farzadso

cc: @Atinux

mmw-ben commented 4 years ago

Yes I'd like to see these features added to

pi0 commented 4 years ago

Hi, @hecktarzuli Nice ideas! Would be nice having a proposal/PR per feature :)

hecktarzuli commented 4 years ago

@mmw-ben workin on it!

farzadso commented 4 years ago

@pi0 @hecktarzuli Sorry for the late reply guys. I'll be there along the way for every feature we want to add.