Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Unable to read UTM Params in AEM Cloud Publish Instance , But able to read these params in AEM Cloud Author and local author & local publish

Avatar

Level 1

 

AEM Cloud : utm_source , utm_medium query parameters unable to fetch these values from slingHttpServletRequest object using request.getQueryString() but whereas other parameters  are showing up ex : utm2_source , a=b .

 

 Ex URL : https://publish-p23444-exxxys.adobeaemcloud.com/content/xyz/abcd/en.html?utm_source=xyz&utm_medium=c...

 

From above URL utm_source & utm_medium  are missing in  request.getQueryString() only in publish and able to get in author.

1 Accepted Solution

Avatar

Correct answer by
Level 6

Hi @asateesh ,

So the utm parameters are getting passed to publisher instance from dispatcher as per logs . 

  • For UTM params, request.getQueryString() is it  returning null or some other object? 
  •  What is your current /ignoreUrlParams  configuration for the dispatcher  ?

It may be an encoding issue also. Have you checked if you are passing another query param with an _ character ,  are you able to get the value ?

 

Thanks,

Somen.

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @asateesh 
Please check https://github.com/adobe/aem-dispatcher-optimizer-tool/blob/main/docs/Rules.md#dot---the-dispatcher-... 

 

It could be by design, since these are known param and not suppose to be used at server side.

 

But you can try to add ignoreUrlParams block 

 

/ignoreUrlParams {
  /0002 { /glob "utm_source" /type "deny" }  
}

 



Arun Patidar

Avatar

Level 1

Thank you for replying Arun ,

 

I want the request parameters to passed to publish instance the above configuration you are asking me to 

 

ignoreUrlParams to cache the url even if we have this query param passed through URL.
 
My Ask is the UTM parameters are getting passed to publish instance ( checked the Publish AEM Access  Log ) but when I am trying to read from request.getQueryString() other query parameters I am able to get accept the UTM parameters. 
 
 

Avatar

Correct answer by
Level 6

Hi @asateesh ,

So the utm parameters are getting passed to publisher instance from dispatcher as per logs . 

  • For UTM params, request.getQueryString() is it  returning null or some other object? 
  •  What is your current /ignoreUrlParams  configuration for the dispatcher  ?

It may be an encoding issue also. Have you checked if you are passing another query param with an _ character ,  are you able to get the value ?

 

Thanks,

Somen.

Avatar

Administrator

@asateesh Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni