A strange error I noticed on my Magento 2.2 site yesterday, When I create a URL with google tag generator and then click the link through to the page the campaign tags appear in what I believe is the global messages area of the product pages. under cookie messages.

I can't just remove the globabl message area as there are other messages like added to cart or quote success message appearing which I require.

How can I stop the cookies messages from appearing in the global message area with out effecting the other success / fail messages ?

E.g. If i create the link :


and then go on the front end page, it displays :


above the page image.

Any help would be great


  • Where do you want to display this link and how did you to display it like this ? – PЯINCƏ Oct 18 '18 at 10:42
  • I dont wish to display the cookie message "utm_source=Website&utm_medium=Banner&utm_campaign=Sale&utm_content=dentalPromo" it is being displayed and I want to stop it from being displayed on the frontend of product pages ? – david Oct 18 '18 at 11:00
  • Ok, basically this google link doesn't add the param in cookie messages, check your product file – PЯINCƏ Oct 18 '18 at 11:10

david actually problem is not in the url you are generating. problem is you are printing querysting mistakenly in

enter image description here

You have to open this template and remove this printing code.

  • Thanks , do you know the template location? and what the printing code i need to remove? – david Oct 18 '18 at 11:05
  • actually its depend on template you are using, you can find particular template by enabling template path hints for a second. It will let you know the path in which this issue present. magecomp.com/blog/enable-template-path-hints-in-magento-2 – Hassan Ali Shahzad Oct 18 '18 at 11:11
  • Let me know if still have an issue? – Hassan Ali Shahzad Oct 18 '18 at 11:13
  • if you are unable to find it give me your sits credentials to me in private message I will fix it. – Hassan Ali Shahzad Oct 18 '18 at 12:34
  • Thanks for the advice and kind offer , currently I have a server issue where I cant get into development mode, so looks like I will need to fix this first :( Thanks though! – david Oct 18 '18 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.