Closed phildpearce closed 10 years ago
I'm not going to duplicate these, as it's somewhat needless and introduces a naming convention tailored to your very specific use case.
I may update any boolean type variables to use true/false rather than Yes/No strings for tidiness, though I wouldn't consider this a priority - it just affects how you'd set up your firing rules. The change wouldn't be backwards compatible either (existing rules reliant on Yes/No values would break), so this might be a v2 thing.
The reason why this is needed... is that when dealing with 200CustomDimension and 200CustomMetrics there is a stong chance that a dataLayer variable will be mapped to the wrong thing.
Thus this is not specific to my use case, but all GA premium clients using dataLayers (e.g. I am talking to Dyson.co.uk about this at the moment).
Also these attributes are not "vistior" attributes, they are "user" attributes.
I understand the need to retain backward compatibility, hence I suggested a parallel set of variables. The true/false thing could then only be changed in the new set of variable, so as not to effect historic data.
Also... you could adopt the W3C digital dataLayer naming conversions, to standardise this. This uses a dataLayer2, hence the quotation marks have been removed from the variable names.
user.segment.userScope.cd001.isLoggedIn: "", // customVariable003 user.segment.userScope.cd002.isNewRegistration: "", // customVariable001 user.segment.userScope.cd003.class: "", // customVariable004 user.segment.currencyType.cm001.visitorLifetimeValue: 110.00, // EventValue or CustomMetric value user.segment.userScope.cd004.isUserNewCustomer: false, // customVariable002 user.segment.userScope.cd005.userID: "x1234", // customVariable005 - aka Universal auth.user.getId
Thanks
Please could you leave these variable names unchanged and a NEW parallel set of variables with the same value. "visitorLoginState": "Logged out", "visitorType": "NOT LOGGED IN", "visitorLifetimeValue": 110.00, "visitorExistingCustomer": "No", // Remove this comma "vistiorId": "1234", // Remove this comma // New set - something like this... "user_cd001_userScope_isLoggedIn": "", // customVariable003 "user_cd002_userScope_isNewRegistration": "", // customVariable001 "user_cd003_userScope_class": "", // customVariable004 "user_cm001_currencyType_visitorLifetimeValue": 110.00 // EventValue or CustomMetric value "user_cd004_userScope_isUserNewCustomer": "No", // customVariable002 "user_cd005_userScope_userID": "1234", // customVariable005 - aka Universal auth.user.getId
Also, minor thing but visitorExistingCustomer = "No" should be visitorExistingCustomer = false,
Thanks