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
gvaemAuthor
Level 3
April 30, 2025

@muskaanchandwani 

Thanks for the clarification.

One follow-up to make sure I fully understand the interplay between CDN stripping and Dispatcher configuration:

If removeMarketingParams: false is set in the CDN configuration, but Dispatcher's ignoreUrlParams is still configured with marketing parameters (like utm_*), won't Dispatcher still ignore these parameters from the cache key computation and request handling?

In that case, does setting removeMarketingParams: false truly ensure end-to-end visibility of UTM parameters in AEM Publish (both for caching and application logic), or do we need to coordinate changes in both CDN and Dispatcher layers to actually make UTM parameters available for things like personalization or analytics logic in AEM?

Would love your input on whether there's a single source of truth from Adobe that clarifies this CDN-Dispatcher-AEM flow holistically.


Also what is the best way to handle the caching mechanism when a page is loaded with so many UTM params?