: "Publish date" custom variable in Google Analytics, how to search between two dates? We have the two custom variables on our WordPress site: _gaq.push(['_setCustomVar', 1, 'pubDate', 'June 6, 2014']);
We have the two custom variables on our WordPress site:
_gaq.push(['_setCustomVar', 1, 'pubDate', 'June 6, 2014']);
_gaq.push(['_setCustomVar', 2, 'author', 'Sam']);
The first variable is the date that the post was published.
How do we search for all posts between two dates using this value? Is this possible?
More posts by @Alves908
1 Comments
Sorted by latest first Latest Oldest Best
Sorry, but you cannot filter between dates like that. The filter reference is here. There is one way however to do what you are trying to do. I'm afraid it will only work for the future though. You need to change your custom dimension ( or add a new one) and convert the date into an EPOCH timestamp. That is the number of seconds since Jan 1, 1970 in seconds, i.e. a number. When it is a number you can then filter in your query by converting your query dates into epoch stamps and then using the ga:customVar1>=1457470303 filter syntax in your query.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.