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
Becoming an AMP Analytics vendor #10539
Comments
Thank you @mrjoops for the great suggestion! we will definitely consider it as Piwik needs to be on this list. Google is pushing hard for AMP so this is becoming very important. If you have knowledge or able to help on this, we would very much welcome your help 👍 |
The second link is worth a read, with example pull requests from Xiti and comScore, but I don't have the required Piwik knowledge to answer the questions raised in the document. |
There's no need to become a vendor (which probably wouldn't work with self-hosted instances). The JSON specifying the config can be specified by the AMP page (see docs).
The PIWIK instance could return a config generated based on the site configuration (like enabling link and timer handlers), and offer a simple snippet like the above for integration in one's AMP site. In the meantime, an example JSON would also be useful and a valid intermediate iteration. A more complete implementation would then use the variables to submit all the information in the URL even if custom Javascript can't be run. |
It would be certainly nice to have in Piwik but looking through docs etc would take quite a while. Maybe someone can work out a JSON that could be used and we add later some logic? Also what is the easiest way to test the tracking? Ideally we would also report in the UI whether AMP was used. Something like this might work but I have not tested it:
|
There was an article written about AMP and Piwik: http://www.elftronix.com/guide-to-using-piwik-analytics-with-amp-on-wordpress/ |
If anyone can help adding support for AMP and issuing a pull request, it would be great 👍 |
Mixing https://github.com/Automattic/amp-wp and http://www.elftronix.com/guide-to-using-piwik-analytics-with-amp-on-wordpress/ here is a way to use Piwik Pixel without modifying single.php of AMP : add_action( 'amp_post_template_footer', 'xyz_amp_add_pixel' );
function xyz_amp_add_pixel( $amp_template ) {
$post_id = $amp_template->get( 'post_id' );
?>
<amp-pixel src=”//www.myawesomewebsite.com/piwik/piwik.php?idsite=[ID_NUMBER]&rec=1&action_name=TITLE&urlref=DOCUMENT_REFERRER&url=CANONICAL_URL&rand=RANDOM”></amp-pixel>
<?php
} |
I think some people are missing the point here. As I wrote in my opening post:
The point isn't only about making Piwik "just" work with AMP, the point is to make it work the good and easy way, and also promoting Piwik. [background-story] So in the name of those people who think it won't work because it's not listed on https://www.ampproject.org/docs/guides/analytics/analytics-vendors, and because we want Piwik to be used by real people (not only the open-source/privacy nerds), please become an AMP analytics vendor. |
@mattab Are there any plans on AMP support for Piwik in the near future? |
I could probably take a deeper look at this, read all the docs and vendor submission procedures, elaborate on a plan and maybe hack a little before the end of the year, if it could help. |
@mrjoops would be awesome if you could handle that. If you have any questions we can help with, feel free to ask :) |
Did any progress happen on this front? I am in the boat of integrating Matomo now and 30% of my traffic out of 2.0million monthly sessions comes from AMP pages. |
We haven't worked on this ourselves but we'd provide any help if someone is keen to make progress on this. |
FYI there was a post in the forums which possibly includes a solution: https://forum.matomo.org/t/how-to-add-piwik-to-amp-pages/18424/6 |
Another article for Matomo and AMP for WordPress: https://ampforwp.com/tutorials/article/how-to-add-matomo-piwik-analytics-in-amp/ |
What would be the effort to build AMP support for Matomo? |
@mattab Any updates here? |
A user wrote, asking if Amp HTML is compatible with Matomo. He sent a link of which of our peers are used with Amp: I see several of the tags are different: |
Hello, if anyone is still interested in this please comment. |
AMP (Accelerated Mobile Pages) sites are gaining traction, and tracking data with this technology is a bit more complicated than with pure HTML/JS: https://www.ampproject.org/docs/reference/extended/amp-analytics.html
Sure we can use the pixel image fallback method for basic tracking, but what about becoming an AMP Analytics vendor ? This would be a great way to promote Piwik at a reasonable cost.
https://github.com/ampproject/amphtml/blob/master/extensions/amp-analytics/integrating-analytics.md
The text was updated successfully, but these errors were encountered: