Our matomo instance is not capturing gclid /fbclid url parameters. The url_query_parameter_to_exclude_from_url in config is excluding it. We need to capture these ids for conversion tracking purposes. If we remove gclid/fbclid from url_query_parameter_to_exclude_from_url, will it have any negative impact? Secondly, where will the query parameters be available in matomo if we make this change.
Thanks in advance for your help.
Hi @SriK
This is removed by default, because it pollutes the URL reports, as the same page would be duplicated with gclid and / or fbclid.
I found this, but I think this won’t solve your problem:
Maybe you could, via JavaScript, translate click IDs into campaigns, and then use the translated URL during tracking:
You just have to translate gclid=123456
into mtm_campaign=Google_ads&mtm_keyword=123456
and fbclid=987654
into mtm_campaign=Facebook_ads&mtm_keyword=987654
.
Then _paq.push(['setCustomUrl', pageUrlWithTranslatedAdsId]);
before the _paq.push(['trackPageView']);
command.
Thank you for reply. The links you have shared are very helpful. I wish matomo supports click ids the way they are sent in the url by default - like gclid, fbclid etc instead mtm_cid. But I wonder if I can modify the config.ini to get this result.
Hi @SriK
You can change this via url_query_parameter_to_exclude_from_url
configuration parameter of the configuration file, but as previously said, if you keep it in the URL, you’ll get doubloons in the tracked page URLs.