Preventing Cookie Consent Banners in Synthetic User Journeys

Preventing Cookie Consent Banners in Synthetic User Journeys

Posted on October 24, 2019 by
Read: 4 min

Cookie consent banners and popups are a little like that annoying friend who turns up at your house unannounced when you’re trying to do the washing, asks too many questions and is tricky to get to leave. They’ve also brought their 3 year old with them who’s favourite past time is to pull on your dog’s tail and stare at their private parts. Unlike such visitors, cookie consent banners can be prevented in your synthetic user journeys if you know how.

When writing your journey scripts you will need to account for the possibility of these unwelcome visitors, which might not always be as easy as you think. The popups may be hosted in iFrames, they may require more than one interaction to close or just generally aren’t constructed in a synthetic-friendly way. One way around this is to figure out how the website knows to never show the popup again after you’ve clicked the innocent looking “Accept” button.

Ironically, the way a cookie consent banner remembers your answer to their question is to – brace yourself – store your answer in a cookie. That’s right. Even if you deny consent, they will store that in a cookie. I know…I mean…c’mon.

So how do we figure out what cookie to set to prevent the cookie banner and their 3 year old turning up all over the place?

Checking the Cookies

  1. Open the target website in a new tab
  2. Right click, select ‘Inspect Element’
  3. Select the ‘Application’ tab
  4. Select ‘Clear Storage’
  5. Click the ‘Clear Site Data’ button
  6. Open the ‘Cookies’ list
  7. Select the domain you’re on
  8. Refresh the page
  9. Accept the cookie consent popup
  10. Check for a new cookie in the cookie jar – be patient, this might take some time
  11. Note the cookie name and value from the cookie jar (on RapidSpike the name is “cookie_notice_accepted” and the value is “true”)

This process will hopefully have highlighted at least one cookie that might be the one you’re after. If a few appeared or you’re unsure you believe what I’m saying then there is a method for testing it manually.

Testing the Cookies

  1. Repeat clearing the site data from the previous instructions (part 2)
  2. Click on the ‘Console’ tab in the Inspect Element area
  3. Type in document.cookie = 'name=value' where ‘name’ and ‘value’ are replaced with the cookie you want to test
  4. Hit enter – the cookie should now appear in your cookie jar
  5. Refresh the page
  6. With any luck the cookie consent banner shouldn’t appear

Once you’ve gone through all of this and have a cookie name and value you can reliably use to prevent the cookie banner opening you can go ahead and use the AddCookie action in the RapidSpike journey builder to add a cookie into the website. Just remember to refresh the page in the journey using a Navigate action afterwards to ensure the page reloads with the cookie in place.

A Video

Anyway, I made a video to help show you what to do, which in hind sight you could’ve just skipped to.

 

Become a part of RapidSpike and start looking after
your online business – start your free trial today

 


  • Insider: Yorkshire's Most Exciting Companies
  • Northern Digital Awards 2019 Shortlist
  • KPMG Best British Tech Startup 2019: Northern Finalist
  • Prolific North Tech 100: Top 30 Companies to Watch