Piwik

# open source web analytics

http://piwik.org/

Les articles publiés sur le site

  • Matomo analytics for wordpress

    15 octobre 2019, par Matomo Core TeamCommunity

    Self-hosting web analytics got a whole lot easier! Introducing Matomo for WordPress

    Be the first to try it out! Your feedback is much needed and appreciated

    Get a fully functioning Matomo (which is comparable to Google Analytics) in seconds! How? With the new Matomo Analytics for WordPress plugin. 

    Web analytics in WordPress has never been easier to get, or more powerful. Matomo Analytics for WordPress is the one-stop problem solver. It’ll save you time, money and give you the insights to help your website or business succeed. 

    Best of all, we get to further the goal of decentralising the internet. Our hope is for Matomo Analytics for WordPress to spread far and wide. We’re so excited that more and more people can now get their hands on this powerful, free, open-source analytics platform, in a few clicks!

    Download now and check it out!

    What do you get?

    • No more signing up to third party analytics service (like Google)
    • No more sending away your valuable data to a third party service (like Google)
    • Easy setup –  install with a few clicks, no tracking code installation or developer knowledge needed
    • 100% accurate data – no data sampling and no data limits 
    • Full data ownership – all data is stored on your servers and no one else can see your data
    • Privacy protection / GDPR compliance
    • Ecommerce tracking out-of-the-box (Woocommerce, Easy Digital Downloads, and MemberPress) and we’re keen to add many more over time
    • Powerful features – segmenting, comparing reports, different visualisations, real-time reports, visit logs and visitor profiles, Matomo Tag Manager, dashboards, data export, APIs, and many more
    • Compared to other WordPress solutions we don’t charge you extra for basic features that should work out-of-the-box
    • Just like Matomo On-Premise, Matomo Analytics for WordPress is free

    We need your feedback!

    We all know and love the versatility of WordPress – with over 55,000 plugins and all the different ways of hosting it. However, with this great versatility comes the potential for things to be missed, so we’re keen to hear your feedback.

    Thank you! We really appreciate your help on this ❤️

    How do you get Matomo Analytics for WordPress?

    You can then upload it in your WordPress by going to “Plugins => Add New”. During the upload, if you get an error like “Are you sure you want to do this?”, we recommend you upload the extracted zip file on to your server and into your ‘wp-content/plugins’ folder manually using ftp or ssh. Make sure the plugin name is ‘matomo’.

    All you need is at least WordPress 4.8 and PHP 7.0 or later. MySQL 5.1+ is recommended. 

    The source code is available at: https://github.com/matomo-org/wp-matomo/

    In perfect harmony: Matomo and WordPress

    Matomo Analytics for WordPress

    The idea for this started two years ago when we realised the similarities between the Matomo and WordPress project. 

    Not only from a technological point of view – where both are based on PHP and MySQL and can be extended using plugins – but also from a philosophical, license and values point of view. We both believe in privacy, security, data ownership, openness, transparency, having things working out-of-the-box, simplicity etc. 

    WordPress is currently used on approximately 30% of all websites. Many of them use the self-hosted open-source WordPress version. Giving everyone in this market the opportunity to easily get a powerful web analytics platform for free, means a lot to us. We believe WordPress users get a real choice besides the standard solution of Google Analytics, and it furthers our effort and goal of decentralising the internet. 

    We’re hoping more people will be empowered to protect user privacy, have access to a great free and open-source tool, and keep control of data in their own hands.

    We hope you feel the same. Help us spread the word to your friends and get them in on this awesome new project!

    Share on facebook
    Share on twitter
    Share on linkedin

    FAQs

    Isn’t there already a WP-Matomo plugin for WordPress available?

    Yes, the existing WP-Matomo (WP-Piwik) plugin is an awesome plugin to connect your existing Matomo On-Premise or Matomo Cloud account with WordPress. The difference is that this new plugin installs Matomo Analytics fully in your WordPress. So you get the convenience of having a powerful analytics platform within your WordPress.

    We highly recommend you install this new plugin if you use WordPress and are not running Matomo yet.  

    If you are already using Matomo on our Cloud or On-Premise, we’d still highly recommend you use WP-Matomo (WP-Piwik). So that you get an easier way of inserting the tracking code into your WordPress site and get insights faster.

    I have a high traffic website, will it be an issue?

    If you have a lot of traffic, we’d advise you to install Matomo On-Premise separately. There’s no specific traffic threshold we can give you on when it’s better to use Matomo On-Premise. It really depends on your server.  

    We reckon if you have more than 500,000 page views a month, you may want to think about using Matomo On-Premise with WP-Matomo instead, but this is just an estimate. In general, if the load on your server is already quite high, then it might be better to install Matomo on a separate server. See also recommended server sizing for running Matomo.

    How do I report a bug or request a new feature in Matomo for WordPress?

    Please create an issue, on our repository whenever you find a bug or if you have any suggestion or ideas of improvement. We want to build an outstanding analytics experience for WordPress!

    Have another question you’re dying to ask? The Matomo for WordPress FAQ page might have the answer you need. 

    Matomo Analytics for WordPress newsletter

    Get ahead of the crowd – signup to our exclusive Matomo for WordPress newsletter to get the latest updates on this exciting new project.

    <script type="text/javascript">
    (function(global) {
    function serialize(form){if(!form||form.nodeName!=="FORM"){return }var i,j,q=[];for(i=form.elements.length-1;i>=0;i=i-1){if(form.elements[i].name===""){continue}switch(form.elements[i].nodeName){case"INPUT":switch(form.elements[i].type){case"text":case"hidden":case"password":case"button":case"reset":case"submit":q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].value));break;case"checkbox":case"radio":if(form.elements[i].checked){q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].value))}break;case"file":break}break;case"TEXTAREA":q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].value));break;case"SELECT":switch(form.elements[i].type){case"select-one":q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].value));break;case"select-multiple":for(j=form.elements[i].options.length-1;j>=0;j=j-1){if(form.elements[i].options[j].selected){q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].options[j].value))}}break}break;case"BUTTON":switch(form.elements[i].type){case"reset":case"submit":case"button":q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].value));break}break}}return q.join("&")};


    function extend(destination, source) {
    for (var prop in source) {
    destination[prop] = source[prop];
    }
    }

    if (!Mimi) var Mimi = {};
    if (!Mimi.Signups) Mimi.Signups = {};

    Mimi.Signups.EmbedValidation = function() {
    this.initialize();

    var _this = this;
    if (document.addEventListener) {
    this.form.addEventListener('submit', function(e){
    _this.onFormSubmit(e);
    });
    } else {
    this.form.attachEvent('onsubmit', function(e){
    _this.onFormSubmit(e);
    });
    }
    };

    extend(Mimi.Signups.EmbedValidation.prototype, {
    initialize: function() {
    this.form = document.getElementById('ema_signup_form');
    this.submit = document.getElementById('webform_submit_button');
    this.callbackName = 'jsonp_callback_' + Math.round(100000 * Math.random());
    this.validEmail = /.+@.+\..+/
    },

    onFormSubmit: function(e) {
    e.preventDefault();

    this.validate();
    if (this.isValid) {
    this.submitForm();
    } else {
    this.revalidateOnChange();
    }
    },

    validate: function() {
    this.isValid = true;
    this.emailValidation();
    this.fieldAndListValidation();
    this.updateFormAfterValidation();
    },

    emailValidation: function() {
    var email = document.getElementById('signup_email');

    if (this.validEmail.test(email.value)) {
    this.removeTextFieldError(email);
    } else {
    this.textFieldError(email);
    this.isValid = false;
    }
    },

    fieldAndListValidation: function() {
    var fields = this.form.querySelectorAll('.mimi_field.required');

    for (var i = 0; i < fields.length; ++i) {
    var field = fields[i],
    type = this.fieldType(field);
    if (type === 'checkboxes' || type === 'radio_buttons' || type === 'age_check') {
    this.checkboxAndRadioValidation(field);
    } else {
    this.textAndDropdownValidation(field, type);
    }
    }
    },

    fieldType: function(field) {
    var type = field.querySelectorAll('.field_type');

    if (type.length) {
    return type[0].getAttribute('data-field-type');
    } else if (field.className.indexOf('checkgroup') >= 0) {
    return 'checkboxes';
    } else {
    return 'text_field';
    }
    },

    checkboxAndRadioValidation: function(field) {
    var inputs = field.getElementsByTagName('input'),
    selected = false;

    for (var i = 0; i < inputs.length; ++i) {
    var input = inputs[i];
    if((input.type === 'checkbox' || input.type === 'radio') && input.checked) {
    selected = true;
    }
    }

    if (selected) {
    field.className = field.className.replace(/ invalid/g, '');
    } else {
    if (field.className.indexOf('invalid') === -1) {
    field.className += ' invalid';
    }

    this.isValid = false;
    }
    },

    textAndDropdownValidation: function(field, type) {
    var inputs = field.getElementsByTagName('input');

    for (var i = 0; i < inputs.length; ++i) {
    var input = inputs[i];
    if (input.name.indexOf('signup') >= 0) {
    if (type === 'text_field') {
    this.textValidation(input);
    } else {
    this.dropdownValidation(field, input);
    }
    }
    }
    this.htmlEmbedDropdownValidation(field);
    },

    textValidation: function(input) {
    if (input.id === 'signup_email') return;

    if (input.value) {
    this.removeTextFieldError(input);
    } else {
    this.textFieldError(input);
    this.isValid = false;
    }
    },

    dropdownValidation: function(field, input) {
    if (input.value) {
    field.className = field.className.replace(/ invalid/g, '');
    } else {
    if (field.className.indexOf('invalid') === -1) field.className += ' invalid';
    this.onSelectCallback(input);
    this.isValid = false;
    }
    },

    htmlEmbedDropdownValidation: function(field) {
    var dropdowns = field.querySelectorAll('.mimi_html_dropdown');
    var _this = this;

    for (var i = 0; i < dropdowns.length; ++i) {
    var dropdown = dropdowns[i];

    if (dropdown.value) {
    field.className = field.className.replace(/ invalid/g, '');
    } else {
    if (field.className.indexOf('invalid') === -1) field.className += ' invalid';
    this.isValid = false;
    dropdown.onchange = (function(){ _this.validate(); });
    }
    }
    },

    textFieldError: function(input) {
    input.className = 'required invalid';
    input.placeholder = input.getAttribute('data-required-field');
    },

    removeTextFieldError: function(input) {
    input.className = 'required';
    input.placeholder = '';
    },

    onSelectCallback: function(input) {
    if (typeof Widget === 'undefined' || !Widget.BasicDropdown) return;

    var dropdownEl = input.parentNode,
    instances = Widget.BasicDropdown.instances,
    _this = this;

    for (var i = 0; i < instances.length; ++i) {
    var instance = instances[i];
    if (instance.wrapperEl === dropdownEl) {
    instance.onSelect = function(){ _this.validate() };
    }
    }
    },

    updateFormAfterValidation: function() {
    this.form.className = this.setFormClassName();
    this.submit.value = this.submitButtonText();
    this.submit.disabled = !this.isValid;
    this.submit.className = this.isValid ? 'submit' : 'disabled';
    },

    setFormClassName: function() {
    var name = this.form.className;

    if (this.isValid) {
    return name.replace(/\s?mimi_invalid/, '');
    } else {
    if (name.indexOf('mimi_invalid') === -1) {
    return name += ' mimi_invalid';
    } else {
    return name;
    }
    }
    },

    submitButtonText: function() {
    var invalidFields = document.querySelectorAll('.invalid'),
    text;

    if (this.isValid || !invalidFields) {
    text = this.submit.getAttribute('data-default-text');
    } else {
    if (invalidFields.length || invalidFields[0].className.indexOf('checkgroup') === -1) {
    text = this.submit.getAttribute('data-invalid-text');
    } else {
    text = this.submit.getAttribute('data-choose-list');
    }
    }
    return text;
    },

    submitForm: function() {
    this.formSubmitting();

    var _this = this;
    window[this.callbackName] = function(response) {
    delete window[this.callbackName];
    document.body.removeChild(script);
    _this.onSubmitCallback(response);
    };

    var script = document.createElement('script');
    script.src = this.formUrl('json');
    document.body.appendChild(script);
    },

    formUrl: function(format) {
    var action = this.form.action;
    if (format === 'json') action += '.json';
    return action + '?callback=' + this.callbackName + '&' + serialize(this.form);
    },

    formSubmitting: function() {
    this.form.className += ' mimi_submitting';
    this.submit.value = this.submit.getAttribute('data-submitting-text');
    this.submit.disabled = true;
    this.submit.className = 'disabled';
    },

    onSubmitCallback: function(response) {
    if (response.success) {
    this.onSubmitSuccess(response.result);
    } else {
    top.location.href = this.formUrl('html');
    }
    },

    onSubmitSuccess: function(result) {
    if (result.has_redirect) {
    top.location.href = result.redirect;
    } else if(result.single_opt_in || !result.confirmation_html) {
    this.disableForm();
    this.updateSubmitButtonText(this.submit.getAttribute('data-thanks'));
    } else {
    this.showConfirmationText(result.confirmation_html);
    }
    },

    showConfirmationText: function(html) {
    var fields = this.form.querySelectorAll('.mimi_field');

    for (var i = 0; i < fields.length; ++i) {
    fields[i].style['display'] = 'none';
    }

    (this.form.querySelectorAll('fieldset')[0] || this.form).innerHTML = html;
    },

    disableForm: function() {
    var elements = this.form.elements;
    for (var i = 0; i < elements.length; ++i) {
    elements[i].disabled = true;
    }
    },

    updateSubmitButtonText: function(text) {
    this.submit.value = text;
    },

    revalidateOnChange: function() {
    var fields = this.form.querySelectorAll(".mimi_field.required"),
    _this = this;

    var onTextFieldChange = function() {
    if (this.getAttribute('name') === 'signup[email]') {
    if (_this.validEmail.test(this.value)) _this.validate();
    } else {
    if (this.value.length === 1) _this.validate();
    }
    }

    for (var i = 0; i < fields.length; ++i) {
    var inputs = fields[i].getElementsByTagName('input');
    for (var j = 0; j < inputs.length; ++j) {
    if (this.fieldType(fields[i]) === 'text_field') {
    inputs[j].onkeyup = onTextFieldChange;
    inputs[j].onchange = onTextFieldChange;
    } else {
    inputs[j].onchange = function(){ _this.validate() };
    }
    }
    }
    }
    });

    if (document.addEventListener) {
    document.addEventListener("DOMContentLoaded", function() {
    new Mimi.Signups.EmbedValidation();
    });
    }
    else {
    window.attachEvent('onload', function() {
    new Mimi.Signups.EmbedValidation();
    });
    }
    })(this);
    </script>
  • Matomo analytics for wordpress

    15 octobre 2019, par Matomo Core TeamCommunity

    Self-hosting web analytics got a whole lot easier! Introducing Matomo for WordPress

    Be the first to try it out! Your feedback is much needed and appreciated

    Get a fully functioning Matomo (which is comparable to Google Analytics) in seconds! How? With the new Matomo Analytics for WordPress plugin. 

    Web analytics in WordPress has never been easier to get, or more powerful. Matomo Analytics for WordPress is the one-stop problem solver. It’ll save you time, money and give you the insights to help your website or business succeed. 

    Best of all, we get to further the goal of decentralising the internet. Our hope is for Matomo Analytics for WordPress to spread far and wide. We’re so excited that more and more people can now get their hands on this powerful, free, open-source analytics platform, in a few clicks!

    Download now and check it out!

    What do you get?

    • No more signing up to third party analytics service (like Google)
    • No more sending away your valuable data to a third party service (like Google)
    • Easy setup –  install with a few clicks, no tracking code installation or developer knowledge needed
    • 100% accurate data – no data sampling and no data limits 
    • Full data ownership – all data is stored on your servers and no one else can see your data
    • Privacy protection / GDPR compliance
    • Ecommerce tracking out-of-the-box (Woocommerce, Easy Digital Downloads, and MemberPress) and we’re keen to add many more over time
    • Powerful features – segmenting, comparing reports, different visualisations, real-time reports, visit logs and visitor profiles, Matomo Tag Manager, dashboards, data export, APIs, and many more
    • Compared to other WordPress solutions we don’t charge you extra for basic features that should work out-of-the-box
    • Just like Matomo On-Premise, Matomo Analytics for WordPress is free

    We need your feedback!

    We all know and love the versatility of WordPress – with over 55,000 plugins and all the different ways of hosting it. However, with this great versatility comes the potential for things to be missed, so we’re keen to hear your feedback.

    Thank you! We really appreciate your help on this ❤️

    How do you get Matomo Analytics for WordPress?

    Log in to your WordPress and go to “Plugins => Add New”, search for “Matomo Analytics – Ethical Stats. Powerful Insights”, click on “Install” and then “Activate”.

    All you need is at least WordPress 4.8 and PHP 7.0 or later. MySQL 5.1+ is recommended. 

    The source code is available at: https://github.com/matomo-org/wp-matomo/

    In perfect harmony: Matomo and WordPress

    Matomo Analytics for WordPress

    The idea for this started two years ago when we realised the similarities between the Matomo and WordPress project. 

    Not only from a technological point of view – where both are based on PHP and MySQL and can be extended using plugins – but also from a philosophical, license and values point of view. We both believe in privacy, security, data ownership, openness, transparency, having things working out-of-the-box, simplicity etc. 

    WordPress is currently used on approximately 30% of all websites. Many of them use the self-hosted open-source WordPress version. Giving everyone in this market the opportunity to easily get a powerful web analytics platform for free, means a lot to us. We believe WordPress users get a real choice besides the standard solution of Google Analytics, and it furthers our effort and goal of decentralising the internet. 

    We’re hoping more people will be empowered to protect user privacy, have access to a great free and open-source tool, and keep control of data in their own hands.

    We hope you feel the same. Help us spread the word to your friends and get them in on this awesome new project!

    Share on facebook
    Share on twitter
    Share on linkedin

    FAQs

    Isn’t there already a WP-Matomo plugin for WordPress available?

    Yes, the existing WP-Matomo (WP-Piwik) plugin is an awesome plugin to connect your existing Matomo On-Premise or Matomo Cloud account with WordPress. The difference is that this new plugin installs Matomo Analytics fully in your WordPress. So you get the convenience of having a powerful analytics platform within your WordPress.

    We highly recommend you install this new plugin if you use WordPress and are not running Matomo yet.  

    If you are already using Matomo on our Cloud or On-Premise, we’d still highly recommend you use WP-Matomo (WP-Piwik). So that you get an easier way of inserting the tracking code into your WordPress site and get insights faster.

    I have a high traffic website, will it be an issue?

    If you have a lot of traffic, we’d advise you to install Matomo On-Premise separately. There’s no specific traffic threshold we can give you on when it’s better to use Matomo On-Premise. It really depends on your server.  

    We reckon if you have more than 500,000 page views a month, you may want to think about using Matomo On-Premise with WP-Matomo instead, but this is just an estimate. In general, if the load on your server is already quite high, then it might be better to install Matomo on a separate server. See also recommended server sizing for running Matomo.

    How do I report a bug or request a new feature in Matomo for WordPress?

    Please create an issue, on our repository whenever you find a bug or if you have any suggestion or ideas of improvement. We want to build an outstanding analytics experience for WordPress!

    Have another question you’re dying to ask? The Matomo for WordPress FAQ page might have the answer you need. 

    Matomo Analytics for WordPress newsletter

    Get ahead of the crowd – signup to our exclusive Matomo for WordPress newsletter to get the latest updates on this exciting new project.

    <script type="text/javascript">
    (function(global) {
    function serialize(form){if(!form||form.nodeName!=="FORM"){return }var i,j,q=[];for(i=form.elements.length-1;i>=0;i=i-1){if(form.elements[i].name===""){continue}switch(form.elements[i].nodeName){case"INPUT":switch(form.elements[i].type){case"text":case"hidden":case"password":case"button":case"reset":case"submit":q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].value));break;case"checkbox":case"radio":if(form.elements[i].checked){q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].value))}break;case"file":break}break;case"TEXTAREA":q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].value));break;case"SELECT":switch(form.elements[i].type){case"select-one":q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].value));break;case"select-multiple":for(j=form.elements[i].options.length-1;j>=0;j=j-1){if(form.elements[i].options[j].selected){q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].options[j].value))}}break}break;case"BUTTON":switch(form.elements[i].type){case"reset":case"submit":case"button":q.push(form.elements[i].name+"="+encodeURIComponent(form.elements[i].value));break}break}}return q.join("&")};


    function extend(destination, source) {
    for (var prop in source) {
    destination[prop] = source[prop];
    }
    }

    if (!Mimi) var Mimi = {};
    if (!Mimi.Signups) Mimi.Signups = {};

    Mimi.Signups.EmbedValidation = function() {
    this.initialize();

    var _this = this;
    if (document.addEventListener) {
    this.form.addEventListener('submit', function(e){
    _this.onFormSubmit(e);
    });
    } else {
    this.form.attachEvent('onsubmit', function(e){
    _this.onFormSubmit(e);
    });
    }
    };

    extend(Mimi.Signups.EmbedValidation.prototype, {
    initialize: function() {
    this.form = document.getElementById('ema_signup_form');
    this.submit = document.getElementById('webform_submit_button');
    this.callbackName = 'jsonp_callback_' + Math.round(100000 * Math.random());
    this.validEmail = /.+@.+\..+/
    },

    onFormSubmit: function(e) {
    e.preventDefault();

    this.validate();
    if (this.isValid) {
    this.submitForm();
    } else {
    this.revalidateOnChange();
    }
    },

    validate: function() {
    this.isValid = true;
    this.emailValidation();
    this.fieldAndListValidation();
    this.updateFormAfterValidation();
    },

    emailValidation: function() {
    var email = document.getElementById('signup_email');

    if (this.validEmail.test(email.value)) {
    this.removeTextFieldError(email);
    } else {
    this.textFieldError(email);
    this.isValid = false;
    }
    },

    fieldAndListValidation: function() {
    var fields = this.form.querySelectorAll('.mimi_field.required');

    for (var i = 0; i < fields.length; ++i) {
    var field = fields[i],
    type = this.fieldType(field);
    if (type === 'checkboxes' || type === 'radio_buttons' || type === 'age_check') {
    this.checkboxAndRadioValidation(field);
    } else {
    this.textAndDropdownValidation(field, type);
    }
    }
    },

    fieldType: function(field) {
    var type = field.querySelectorAll('.field_type');

    if (type.length) {
    return type[0].getAttribute('data-field-type');
    } else if (field.className.indexOf('checkgroup') >= 0) {
    return 'checkboxes';
    } else {
    return 'text_field';
    }
    },

    checkboxAndRadioValidation: function(field) {
    var inputs = field.getElementsByTagName('input'),
    selected = false;

    for (var i = 0; i < inputs.length; ++i) {
    var input = inputs[i];
    if((input.type === 'checkbox' || input.type === 'radio') && input.checked) {
    selected = true;
    }
    }

    if (selected) {
    field.className = field.className.replace(/ invalid/g, '');
    } else {
    if (field.className.indexOf('invalid') === -1) {
    field.className += ' invalid';
    }

    this.isValid = false;
    }
    },

    textAndDropdownValidation: function(field, type) {
    var inputs = field.getElementsByTagName('input');

    for (var i = 0; i < inputs.length; ++i) {
    var input = inputs[i];
    if (input.name.indexOf('signup') >= 0) {
    if (type === 'text_field') {
    this.textValidation(input);
    } else {
    this.dropdownValidation(field, input);
    }
    }
    }
    this.htmlEmbedDropdownValidation(field);
    },

    textValidation: function(input) {
    if (input.id === 'signup_email') return;

    if (input.value) {
    this.removeTextFieldError(input);
    } else {
    this.textFieldError(input);
    this.isValid = false;
    }
    },

    dropdownValidation: function(field, input) {
    if (input.value) {
    field.className = field.className.replace(/ invalid/g, '');
    } else {
    if (field.className.indexOf('invalid') === -1) field.className += ' invalid';
    this.onSelectCallback(input);
    this.isValid = false;
    }
    },

    htmlEmbedDropdownValidation: function(field) {
    var dropdowns = field.querySelectorAll('.mimi_html_dropdown');
    var _this = this;

    for (var i = 0; i < dropdowns.length; ++i) {
    var dropdown = dropdowns[i];

    if (dropdown.value) {
    field.className = field.className.replace(/ invalid/g, '');
    } else {
    if (field.className.indexOf('invalid') === -1) field.className += ' invalid';
    this.isValid = false;
    dropdown.onchange = (function(){ _this.validate(); });
    }
    }
    },

    textFieldError: function(input) {
    input.className = 'required invalid';
    input.placeholder = input.getAttribute('data-required-field');
    },

    removeTextFieldError: function(input) {
    input.className = 'required';
    input.placeholder = '';
    },

    onSelectCallback: function(input) {
    if (typeof Widget === 'undefined' || !Widget.BasicDropdown) return;

    var dropdownEl = input.parentNode,
    instances = Widget.BasicDropdown.instances,
    _this = this;

    for (var i = 0; i < instances.length; ++i) {
    var instance = instances[i];
    if (instance.wrapperEl === dropdownEl) {
    instance.onSelect = function(){ _this.validate() };
    }
    }
    },

    updateFormAfterValidation: function() {
    this.form.className = this.setFormClassName();
    this.submit.value = this.submitButtonText();
    this.submit.disabled = !this.isValid;
    this.submit.className = this.isValid ? 'submit' : 'disabled';
    },

    setFormClassName: function() {
    var name = this.form.className;

    if (this.isValid) {
    return name.replace(/\s?mimi_invalid/, '');
    } else {
    if (name.indexOf('mimi_invalid') === -1) {
    return name += ' mimi_invalid';
    } else {
    return name;
    }
    }
    },

    submitButtonText: function() {
    var invalidFields = document.querySelectorAll('.invalid'),
    text;

    if (this.isValid || !invalidFields) {
    text = this.submit.getAttribute('data-default-text');
    } else {
    if (invalidFields.length || invalidFields[0].className.indexOf('checkgroup') === -1) {
    text = this.submit.getAttribute('data-invalid-text');
    } else {
    text = this.submit.getAttribute('data-choose-list');
    }
    }
    return text;
    },

    submitForm: function() {
    this.formSubmitting();

    var _this = this;
    window[this.callbackName] = function(response) {
    delete window[this.callbackName];
    document.body.removeChild(script);
    _this.onSubmitCallback(response);
    };

    var script = document.createElement('script');
    script.src = this.formUrl('json');
    document.body.appendChild(script);
    },

    formUrl: function(format) {
    var action = this.form.action;
    if (format === 'json') action += '.json';
    return action + '?callback=' + this.callbackName + '&' + serialize(this.form);
    },

    formSubmitting: function() {
    this.form.className += ' mimi_submitting';
    this.submit.value = this.submit.getAttribute('data-submitting-text');
    this.submit.disabled = true;
    this.submit.className = 'disabled';
    },

    onSubmitCallback: function(response) {
    if (response.success) {
    this.onSubmitSuccess(response.result);
    } else {
    top.location.href = this.formUrl('html');
    }
    },

    onSubmitSuccess: function(result) {
    if (result.has_redirect) {
    top.location.href = result.redirect;
    } else if(result.single_opt_in || !result.confirmation_html) {
    this.disableForm();
    this.updateSubmitButtonText(this.submit.getAttribute('data-thanks'));
    } else {
    this.showConfirmationText(result.confirmation_html);
    }
    },

    showConfirmationText: function(html) {
    var fields = this.form.querySelectorAll('.mimi_field');

    for (var i = 0; i < fields.length; ++i) {
    fields[i].style['display'] = 'none';
    }

    (this.form.querySelectorAll('fieldset')[0] || this.form).innerHTML = html;
    },

    disableForm: function() {
    var elements = this.form.elements;
    for (var i = 0; i < elements.length; ++i) {
    elements[i].disabled = true;
    }
    },

    updateSubmitButtonText: function(text) {
    this.submit.value = text;
    },

    revalidateOnChange: function() {
    var fields = this.form.querySelectorAll(".mimi_field.required"),
    _this = this;

    var onTextFieldChange = function() {
    if (this.getAttribute('name') === 'signup[email]') {
    if (_this.validEmail.test(this.value)) _this.validate();
    } else {
    if (this.value.length === 1) _this.validate();
    }
    }

    for (var i = 0; i < fields.length; ++i) {
    var inputs = fields[i].getElementsByTagName('input');
    for (var j = 0; j < inputs.length; ++j) {
    if (this.fieldType(fields[i]) === 'text_field') {
    inputs[j].onkeyup = onTextFieldChange;
    inputs[j].onchange = onTextFieldChange;
    } else {
    inputs[j].onchange = function(){ _this.validate() };
    }
    }
    }
    }
    });

    if (document.addEventListener) {
    document.addEventListener("DOMContentLoaded", function() {
    new Mimi.Signups.EmbedValidation();
    });
    }
    else {
    window.attachEvent('onload', function() {
    new Mimi.Signups.EmbedValidation();
    });
    }
    })(this);
    </script>
  • What is Google Analytics data sampling and what’s so bad about it ?

    16 août 2019, par Joselyn KhorAnalytics Tips, Development

    What is Google Analytics data sampling, and what’s so bad about it?

    Google (2019) explains what data sampling is:

    “In data analysis, sampling is the practice of analysing a subset of all data in order to uncover the meaningful information in the larger data set.”[1]

    This is basically saying instead of analysing all of the data, there’s a threshold on how much data is analysed and any data after that will be an assumption based on patterns.

    Google’s (2019) data sampling thresholds:

    Ad-hoc queries of your data are subject to the following general thresholds for sampling:
    [Google] Analytics Standard: 500k sessions at the property level for the date range you are using
    [Google] Analytics 360: 100M sessions at the view level for the date range you are using (para. 3) [2]

    This threshold is limiting because your data in GA may become more inaccurate as the traffic to your website increases.

    Say you’re looking through all your traffic data from the last year and find you have 5 million page views. Only 500K of that 5 million is accurate! The data for the remaining 4.5 million (90%) is an assumption based on the 500K sample size.

    This is a key weapon Google uses to sell to large businesses. In order to increase that threshold for more accurate reporting, upgrading to premium Google Analytics 360 for approximately US$150,000 per year seems to be the only choice.

    What’s so bad about data sampling?

    It’s unfair to say sampled data is to be disregarded completely. There is a calculation ensuring it is representative and can allow you to get good enough insights. However, we don’t encourage it as we don’t just want “good enough” data. We want the actual facts.

    In a recent survey sent to Matomo customers, we found a large proportion of users switched from GA to Matomo due to the data sampling issue.

    The two reasons why data sampling isn’t preferable: 

    1. If the selected sample size is too small, you won’t get a good representative of all the data. 
    2. The bigger your website grows, the more inaccurate your reports will become.

    An example of why we don’t fully trust sampled data is, say you have an ecommerce store and see your GA revenue reports aren’t matching the actual sales data, due to data sampling. In GA you may be seeing revenue for the month as $1 million, instead of actual sales of $800K.

    The sampling here has caused an inaccuracy that could have negative financial implications. What you get in the GA report is an estimated dollar figure rather than the actual sales. Making decisions based on inaccurate data can be costly in this case. 

    Another disadvantage to sampled data is that you might be missing out on opportunities you would’ve noticed if you were given a view of the whole. E.g. not being able to see real patterns occurring due to the data already being predicted. 

    By not getting a chance to see things as they are and only being able to jump to the conclusions and assumptions made by GA is risky. The bigger your business grows, the less you can risk making business decisions based on assumptions that could be inaccurate. 

    If you feel you could be missing out on opportunities because your GA data is sampled data, get 100% accurately reported data. 

    The benefits of 100% accurate data

    Matomo doesn’t use data sampling on any of our products or plans. You get to see all of your data and not a sampled data set.

    Data quality is necessary for high impact decision-making. It’s hard to make strategic changes if you don’t have confidence that your data is reliable and accurate.

    Learn about how Matomo is a serious contender to Google Analytics 360. 

    Now you can import your Google Analytics data directly into your Matomo

    If you’re wanting to make the switch to Matomo but worried about losing all your historic Google Analytics data, you can now import this directly into your Matomo with the Google Analytics Importer tool.


    Take the challenge!

    Compare your Google Analytics data (sampled data) against your Matomo data, or if you don’t have Matomo data yet, sign up to our 30-day free trial and start tracking!

    References:

    [1 & 2] About data sampling. (2019). In Analytics Help About data sampling. Retrieved August 14, 2019, from https://support.google.com/analytics/answer/2637192

  • Your 6-step guide to increasing acquisition

    2 juillet 2019, par Matomo Core TeamAnalytics Tips

    Your 6-step guide to increasing acquisition

    Want to save time and money, as well as increase conversions and acquisition? Matomo Analytics is here to help with that!

    Let’s start by helping you create a website visitors’ acquisition strategy, without it you might be going in blind and missing opportunities that might’ve been easily found in your metrics.

    To help you craft a strategy for your site, check out the steps below!

    Step one: Get familiar with the Acquisition feature

    The easiest way is to start with Matomo’s Acquisition feature itself. Discover and take action on the marketing channels with the biggest ROI for your business. You’ll learn:

    How to get traffic from external websites: Find out who’s helping you succeed from external websites and convince them to do more of it. Get more traffic by proactively asking for: paid sponsorships; guest blog posts; or spending more advertising on the particular website.

    About Social Networks: Which social media channels are connecting with the audience you want? Take the guesswork out by using only the ones you need. By finding out which social channels your ideal audience prefers, you can generate shareable, convincing and engaging content to drive shares and traffic through to your site.

    Campaigns: This helps you understand which marketing campaign is working and which isn’t. You can then shift your efforts to effectively gain more visitors with less costs. Keep track of every ad and content piece you show across internal and external channels to see which has the biggest impact on your business objectives.

    Enhanced SEO: Every acquisition plan needs a focus on maximising your Search Engine Optimization (SEO) efforts. When it comes to getting conclusive search engine referrer metrics, you need to be sure you’re getting ALL the insights to drive your SEO strategy. See keyword position rankings, integrate Google, Bing and Yahoo search consoles, and no longer be restricted with “keyword not defined” showing up in your keywords reports.

    >> Watch Acquisition introduction video (playtime: 2.54 minutes)

    Step two: Set your goals and monitor conversion funnels

    Let the Goals feature guide you

    Goals are essential for building your marketing strategy and getting new customers. The more goals you track, the more you learn about behavioural changes and modify pathways to impact acquisitions over time. 

    Are you checking:

    • Which channels are converting the best for your business?
    • Which cities/countries are most popular?
    • What devices will attract the most visitors?
    • How engaged your visitors are before converting?

    This way you can see if your campaigns (SEO, PPC, signups, blogs etc.) or optimising efforts (A/B Testing, Funnels) have made an impact with the time and investment you’ve put in.

    >> Watch Goals introduction video (playtime: 2.04 minutes)

    The Funnels feature leads you to success

    Conversion funnels give you the big picture on whether your acquisition plans are paying off and where they may be falling short. If the ultimate goal of your site is to drive conversions, then each funnel can tell you how effectively you’re driving traffic through to your desired outcome.

    >> Watch Funnels introduction video (playtime: 2.29 minutes)

    Goals feature web analytics

    Step three: Measure the success of every touchpoint in your customer’s journey

    Multi Attribution feature

    Accurately identify channels where visitors first engage with your business, as well as the final channel they came from, before purchasing your product/service. This helps you make smarter decisions when determining acquisition spend to accurately calculate the Customer Acquisition Cost (CAC). Here you no longer falsely over-estimate investment in failing marketing channels.

    >> Watch Multi Attribution introduction video (playtime: 2.28 minutes)

    Step four: For ecommerce sites, understand who your customers are to increase sales

    Ecommerce feature to significantly increase $ potential

    If your website’s overall purpose is to generate revenue, the Ecommerce feature gives you comprehensive insights into your customer’s purchasing behaviours.

    This heavily reduces your risks when marketing products to potential customers as you’ll understand who to target, what to target them with and where further opportunities exist.

    >> Watch Ecommerce introduction video (playtime: 2.04 minutes)

    e-commerce analytics

    Step five: Make sure the forms on your website are easy to complete

    Form Analytics feature

    Once you get visitors through the funnel, the forms on your website are the final step to conversion and need special attention. If not done right, you could be missing out on converting a large portion of your visitors.

    Thankfully, you can now identify and fix pain points on the forms that are most important to your business’ success.

    >> Watch Form Analytics introduction video (playtime: 2.39 minutes)

    Form analytics feature

    Step six: Discover what a customer journey looks like on a user-by-user basis and bring in key acquisition elements to your strategy

    Visitor Profiles tell you each visitors’ history

    The Profile feature summarises every visit, action and purchase made.

    Better understand:

    • Why your visitors viewed your website.
    • Why your returning visitors continue to view your website.
    • What specifically your visitors are looking for and whether they found it on your website.

    The benefit is being able to see how a combination of acquisition channels play a part in a single buyer’s journey.

    >> Watch Visitors introduction video (playtime: 1.46 minutes)

    To summarise

    This guide will set you on a path to creating a well-planned acquisition strategy. It’s the key to attracting and capturing the attention of potential visitors/leads, and successfully driving them through a funnel/buyer’s journey on your website.

    Because of Matomo’s reputation as a trusted analytics platform, the features above can be used to assist you in making smarter data-driven decisions. You can pursue different acquisition avenues with confidence and create a strategy that’s agile and ready for success, all while respecting user privacy.

  • How to analyse 404 pages

    1er juillet 2019, par Matomo Core TeamDevelopment, Plugins

    How to analyse “not found” pages (404) in digital analytics

    Have you ever sent out a newsletter and one link wasn’t active yet? Would you like to know how many users get affected when this happens? Would you like to know if your visitors are encountering 404 pages? 

    In this article we’re describing an easy way to analyse “not found” pages on your website with Matomo to increase your visitors’ user experience, user acquisition, and SEO (search engine optimization).

    How to know the number of 404s on my website?

    There are different ways to get this information. Depending on how your website is built, you may or may not collect this data.

    The easiest way to answer this question is to fire a 404 page on your website, you do this by accessing a wrong url:

    how to analyse 404 pages

    As you can see here, in our case, the page title starts with “Page non trouvée” which stands for “Page not found” when translated in English (as the website we are considering here is in French):

    404 page analysis

    In this example 19 page views have been fired and it generated a bounce rate of 67%. As a result ⅔ of the visits ended here.

    In some cases, the information related to a “not found” page can be found either within the title or within the URL, as some websites redirect you to a specific web page when a page can’t be found.

    If you can’t identify “not found” pages via a page title or a page URL, we strongly advise you to use this specific tracking code method on your 404 page: “How to track error pages in Matomo?”

    You can easily set it with Matomo Tag Manager with a custom HTML tag:

    Analysing 404 pages

    where the trigger is the following:

    how to analyse 404 page

    You will however, have to define this trigger as an exclusion for all the other tags which may conflict with it (here below is the new trigger defined for the generic Matomo tags we are inserting on all pages):

    404 page how to analyse

    Once this specific tracking is set, you will be able to track the source of the 404 and will gather all the “not found” pages in a specific group within your Page Title report:

    404 url

    Here, for example, you can identify that the homepage of this website had a link pointing to a 404, in our case it was https://www.webassoc.org/pro-du-web.

    Note that this is just one technique. You could also create a custom dimension report and decide to send the 404 there also.

    How to get notified when a 404 page is visited?

    Trust us, you’re not going to check everyday whether a 404 page has been visited. In order to avoid checking it manually, you can define custom alerts.

    There are three possible scenarios when “not found” pages can be fired:

    • internal 404: one link within your website is pointing to a wrong url on the same website.
    • external 404: someone from an external website made a link to yours and the link is not correct.
    • direct access 404: someone access directly to a not found page on your website.

    You can define all those three within Matomo, but in your case, you will only have to focus on the first two only. In fact, you can’t really fix the third scenario. That’s the reason why we’re not focusing on it. It would result in irrelevant alerts.

    Custom alert for internal 404

    An internal 404 is defined from a 404 where the source is an internal web page. As a result, it will look like the following in your report:

    In this example, we’re using this specific custom implementation, the title of the page will contain “From = https://www.webassoc.org/”. So set our custom alert accordingly:

    Help for 404 pages

    Now every time a 404 page will be fired from an internal page, you’ll be notified by email.

    Note that you can also decide to not receive any email and track the evolution of alerts with the History of triggered alerts feature.

    Custom alert for external 404

    External 404 is almost the same setup. The only thing you need to keep in mind is that we want to exclude the 404 where the source is not indicated. As a result, your configuration will look like the following:

    how to analyse 404 page

    Here your regular expression pattern is the following one:

    404/URL = .*From = (?!https://www.webassoc.org)[^\s]+

    as you’ll want to have any referrer coming from a website which is not Matomo and not a direct 404.

     

    You can now be notified every time that a 404 is fired from any link.

    Note that this configuration may slightly differ from website to website. So always double check your tracking code and the way the values are sent to your reports. Also try to trigger those alerts first before validating them.

    How to follow the evolution of your 404 over time?

    It may be interesting to know how good or how bad you are performing in terms of 404.

    In order to check this information, you can click on the evolution icon near the 404 title:

    404 page help

    But you may be interested in accessing this information more regularly without having to create this report each time.

    So, one way to analyse the evolution of your 404 is to create a segment such as:

    and to click after that on evolution icon:

    analyse 404

    As you can see below the number of “not found” pages is quite low in general, but we can also notice that a period received an increase in terms of 404 not found pages on May 27. It may be interesting to investigate it:

    404 analysis

    You can start from the overview of referrers:

    404 page help

    As you can notice here the main source of 404 is coming from direct entries which is the most difficult channel to analyse as we don’t really know where the visitors are coming from.

    How to perform your analysis even faster?

    As you can see analysing reports in Matomo in order to detect 404 pages is a time-consuming activity. In order to make it faster, you can already create a report about it within the Email reports feature with the following settings:

    • Segment: 404
    • Email schedule: never.
    • Visits summary and Page titles as selected report.

    You will then end up with a saved report listing all the URLs concerned:

    404 url help

    You can also have a look at the “Custom reports” premium feature.

    It will provide you with more flexibility. You will then be able to focus on the most important thing: the cause of 404.

    Good luck and happy analytics!