matomo-org / plugin-MarketingCampaignsReporting

GNU General Public License v3.0
25 stars 19 forks source link

The upper/lower case of parameter values are lost, not expected for "Campaign IDs" parameters like mtm_cid or utm_id #27

Open sesom42 opened 4 years ago

sesom42 commented 4 years ago

We use pk_content to store the Google click ID. This variable is case sensitive. Unfortunately the plugin does not save the variable case sensitive and it becomes invalid.

tsteur commented 4 years ago

I'm not sure what you mean by "it becomes invalid"?

sesom42 commented 4 years ago

It will be invalid for Google. The variable is used to report offline results of campaigns back to Google. Google can't match the click if the variable isn't case-sensitive.

tsteur commented 4 years ago

Sorry @sesom42 you will have to help me here a bit. I'm not so much into it and not fully understand. Which variable do you refer to? The pk_content URL parameter? How does Google expect the variable you refer to?

diosmosis commented 4 years ago

@tsteur I might be wrong, but I think they mean the ID is something like AdFghakfCZZ..., but matomo stores/displays it as adfghakfczz, so if the user wants to get the ID to match it in Google, they can no longer do so (since the casing is lost).

tsteur commented 4 years ago

I see. This might be done here: https://github.com/matomo-org/plugin-MarketingCampaignsReporting/blob/3.1.1/Campaign/CampaignDetector.php#L86

@sgiehl do you maybe remember why that is?

tarasowski commented 2 years ago

Hey guys, any news on that issue? The gclid are lowercased and invalid for Google Offline Conversions.

tsteur commented 2 years ago

@sgiehl do you maybe know more here?

sgiehl commented 2 years ago

Actually I don't think there is a good reason for doing so. I suggested a possible solution here: https://github.com/matomo-org/plugin-MarketingCampaignsReporting/pull/65#issuecomment-842226282 Aren't even segments selected case insensitive, so it should not even be a problem here if the same campaign name ist stored in different cases...

tarasowski commented 2 years ago

@sgiehl / @tsteur guys, can you point me to a solution of how to export data for Google Offline Conversions. I'm trying to store the gclids as mtm_cid but they are lowercased, so they cannot be imported into Google Ads. Are there any other solutions you are aware of?

Danke im Voraus, Dimi

chopsol commented 2 years ago

I don't think there would be an alternative way except of patching the two files according to my pull request. I extended data collection with a parameter mtm_clid (not mtm_cid) for case-sensitive collection. I hoped, this PR would find a way into the core of MCR but for now, I'm patching up to 5 different matomo-instances every time an update of MCR is released. I forget to mention the extension Advertising Conversion Export: https://plugins.matomo.org/AdvertisingConversionExport

tarasowski commented 2 years ago

@chopsol thanks Joachim!

mattab commented 1 year ago

As a follow up to https://github.com/matomo-org/plugin-MarketingCampaignsReporting/pull/65, wouldn't it additionally make sense to apply "Case sensitive" to the whole of campaign_id = "mtm_cid,utm_id,mtm_clid" and not just mtm_clid? Then we could:

  1. remove the mentions to mtm_clid in the inline help
    1. "deprecate" this parameter (instead, people would keep using mtm_cid or utm_id)
sgiehl commented 1 year ago

@mattab As discussed on the PR it would actually make sense to give the user the choice to decide if any of the campaign parameters should be handled case sensitive or not. I think I suggested that on the PR already. We imho should make all parameters case sensitive, so remove the strtolower in tracking. The reports could than have an additional option to group all values either case insensitive or not. I think that would give everyone the most flexibility. But that is something that needs to be applied to core and this plugin.

9joshua commented 1 week ago

A Cloud customer cannot needed to track a case-sensitive campaign ID for offline reporting, but due to forced lower-case letters, there was not way to match their data.