UTM_ is getting blocked when added as a parameter in the URL | Community
Skip to main content
Level 3
April 29, 2025
Solved

UTM_ is getting blocked when added as a parameter in the URL

  • April 29, 2025
  • 2 replies
  • 1470 views

On the AEM cloud, when the url has "UTM_ " the parameter is not working. is there a filter that is blocking? 

Best answer by muskaanchandwani

Hello @gvaem 

To better cache requests, the AEMaaCS CDN removes common marketing related UTM query parameters, specifically those matching the following regex pattern [1]

This functionality can be toggled on and off using a requestTransformations flag in the CDN configuration.

For example, if you’d like to retain marketing parameters in requests at the CDN level, you can deploy 

removeMarketingParams: false

in the CDN Configuration deployed via the Configuration Pipeline.
Example Configuration :

kind: "CDN" version: "1" metadata: envTypes: ["dev", "stage", "prod"] data: requestTransformations: removeMarketingParams: false rules: []

Please refer to the Documentation [2] for more information in this regard.

 

[1] ^(utm_.*|gclid|gdftrk|_ga|mc_.*|trk_.*|dm_i|_ke|sc_.*|fbclid|msclkid|ttclid)$

[2] https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/content-delivery/caching#marketing-parameters

2 replies

SantoshSai
Community Advisor
Community Advisor
April 29, 2025

Hi @gvaem,

AEM as a Cloud Service (AEMaaCS) does block certain query parameters by default. Adobe strips or ignores certain query parameters that are considered non-cache-defining or used only for analytics (like utm_source, utm_medium, etc.) - unless explicitly allowed.

Try updating your AEM Dispatcher config:

filters:
  - /001 { /type "allow" /method "GET" /url ".*" /query "utm_.*" }

 Hope that helps!

Santosh Sai
muskaanchandwani
Adobe Employee
muskaanchandwaniAdobe EmployeeAccepted solution
Adobe Employee
April 29, 2025

Hello @gvaem 

To better cache requests, the AEMaaCS CDN removes common marketing related UTM query parameters, specifically those matching the following regex pattern [1]

This functionality can be toggled on and off using a requestTransformations flag in the CDN configuration.

For example, if you’d like to retain marketing parameters in requests at the CDN level, you can deploy 

removeMarketingParams: false

in the CDN Configuration deployed via the Configuration Pipeline.
Example Configuration :

kind: "CDN" version: "1" metadata: envTypes: ["dev", "stage", "prod"] data: requestTransformations: removeMarketingParams: false rules: []

Please refer to the Documentation [2] for more information in this regard.

 

[1] ^(utm_.*|gclid|gdftrk|_ga|mc_.*|trk_.*|dm_i|_ke|sc_.*|fbclid|msclkid|ttclid)$

[2] https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/content-delivery/caching#marketing-parameters

SantoshSai
Community Advisor
Community Advisor
April 29, 2025

@muskaanchandwani Just to confirm my understanding of how the removeMarketingParams setting behaves in AEM as a Cloud Service:

If I configure removeMarketingParams: false in the cdn.yaml under requestTransformations, will that ensure that all UTM parameters matching the default regex (e.g., utm_source, utm_medium, utm_campaign, etc.) are preserved and passed through to both the AEM Dispatcher and Publish tiers?

Additionally, in environments where removeMarketingParams is left as true (the default), does that mean these parameters are stripped at the CDN level itself - such that even if they are explicitly allowed in dispatcher filters, they still won’t reach AEM at all?

Would appreciate confirmation on this flow and if there’s official Adobe documentation that outlines this behavior and precedence clearly, that would be great to review.

Santosh Sai
muskaanchandwani
Adobe Employee
Adobe Employee
April 29, 2025

Hello @santoshsai 

When removeMarketingParams: false is set - All UTM parameters and others that match the regex pattern (e.g., utm_source, utm_medium, utm_campaign, gclid, etc.) will not be stripped at the CDN level.

When removeMarketingParams: true (the default) - The CDN will strip these marketing-related parameters from requests at the CDN level before passing them to the Dispatcher.
This means that even if you explicitly allow these parameters in your Dispatcher filters, they will not reach AEM because the CDN has already removed them from the request before it reaches AEM.

It is also recommended to configure the Dispatcher configuration’s ignoreUrlParams property even when removeMarketingParams functionality is disabled at CDN level.

Official Documentation :
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/content-delivery/caching#marketing-parameters