Ticket #1845 (new New feature)
Improve Tracking Code admin screen: asynchronous code, other options
| Reported by: | vipsoft | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 1.8 Piwik 1.8 |
| Component: | UI (templates, javascript) | Keywords: | |
| Cc: | Sensitive: | no |
Description (last modified by matt) (diff)
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 #1657
- A 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.
- Should we default to load the JS from /js/ instead of piwik.js? This has the advantage of using compression, expire headers, etc. will result in a faster experience for webservers that do not set expire headers on static JS files.
- 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 setCampaignKeywordKey
Others:
- Explain to users that they might need to escape the code when pasting in a template system such as Smarty
- Explain that on dynamic pages, code can be added to a footer file or similar
- Update the documentation at: http://piwik.org/docs/javascript-tracking/ and other places, to use the asynchronous version
- Could 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 #2041
Change History
Note: See
TracTickets for help on using
tickets.
