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
Improve Javascript Tracking Code admin screen: asynchronous code, other options #1845
Comments
Could we display a notice about each method pros and cons to help the user pick a method tailored to its needs? |
see also #1657 |
Such JS tag config screen would have a checkbox "Track unique visitors across subdomains of $WEBSITE_HOST" which would add the following line:
which will force 1st party cookie to be set across |
If we push the use of asynchronous tracking code, how do we update the documentation, since there will be 2 ways of configuring the tracker? For example, we could have an inlined panel with 2 tables that would display the same tracking code type in all panel. Or, we could simply only display the doc for the asynchronous code. |
I'm also wondering if we could, by default, load the JS from piwik/js/ ? Is there any known blockers from doing it by default (any misconfiguration/missing extension) that are not tested for or handled in all cases? we couldn't really add one more failure option at this level (the "there is no data" FAQ is already quite big). |
Replying to matt:
The code that serves static files is fairly robust now (especially with the double compression problem fixed). +1 Most users who run ABP use subscriptions. Imagine my surprise to see that the latest EasyPrivacy subscription still has piwik.js|php blocked, but ga.js was recently removed from the list. boggle |
Oh that doesn't make much change at all! but maybe with 1st party cookies they will remove it directly. we will leave the piwik.js for 1.2 but if all goes well we could def move to /js in 1.3, which this ticket will be in I think |
There could also be an pre-checked option: which would ensure clicks to sub domains are not tracked as outlinks. |
Please add to the inline text and/or documentation/faq that the user may need to "escape" the pasted tracking code when using a template or an app with its own templating system. |
From #2182, we could inspect the main URL and alias URLs, to see if there are any secure URLs. An example, where a hosting provider might have a shared SSL certificate:
|
scratch that I made an assumption. To be more general, it would require a couple of new parameters (or settings, if you want it persistent) to specify the tracker URL (secure vs non-secure); default would be the current URL. |
Updating ticket description consolidated from comments. |
Other ideas/requirements:
|
In f1f29bc: Refs #1845, added new admin page where users can create their own custom JavaScript tracking code snippets and image tracking link HTML. Notes:
|
All done! |
In c6ac229: Refs #1845, switch to async JS in other places and apply fixes to tracking code admin page & other pages. Notes:
|
In b562ded: Refs #1845 Adding failing JS test for use case discussed Goal: . make it hard to misuse API Bug: if trackPageView is pushed to async before setTrackerUrl, the request will not be tracked. Solution: setTrackerUrl should be executed first even if i was async "pushed" at a later stage (Benaka has patch). |
We would like to propose an advanced page to allow users to generate a tailor made javascript code for their pages.
Some options that this Javascript Tracking tag generator would include are:
display the asynchronous code only (currently we only display the non async code)A radio button to "Group Page Titles report by subdomain". Useful when tracking multiple subdomains in the same Piwik website. See Add option that tracking tag groups Page titles by domain name #1657A radio button to "Track unique visitors across subdomains of $WEBSITE_HOST". Would call .setDomains('.example.org');This would also ensure clicks to sub domains are not tracked as outlinks.allow to customize the campaign and name and keyword parameters (similar to GA "My online campaigns from other providers use different tags than those used by Google Analytics"). Calls setCampaignNameKey and/or setCampaignKeywordKeyHave a separate tool / tab for "Image tracker" that would generate the image given a few possible parameters (page name, idgoal / revenue)This would greatly increase visibility of image tracker feature and would allow marketer to easily tag their newsletters, press releases, ebay pages, with the image tracker.Others:
Explain that on dynamic pages, code can be added to a footer file or similarUpdate the documentation at: http://piwik.org/docs/javascript-tracking/ and other places, to use the asynchronous versionCould we use a JS plugin that allows to show both versions (async by default, tab above the code snippet allowing to switch to non async?)Allow to enable "Ping on page" that will improve bounce rate metric by pinging Piwik regularly when the tab is on focus. see Support Ping requests to report a better 'time on page' #2041http://www.tracewatch.com/doc/code
Finally, it would be nice to review the JS Code section of the Installer to: simplify the text, simplify the UI, give async by default. Also, it would be nice to finally i18n this text so that all users can see it in their language as they all go through it during install!! :)The text was updated successfully, but these errors were encountered: