Using Cookiebot during development on various environments / URLs

Comments

6 comments

  • Avatar
    Spas – vConnect – Community Supporter

    Hi James,

    You could change the domain that your are using from CookieBot admin panel. Also there is a option to add a Domain alias for testing purposes. By using Domain alias you could enable cookie consent on internal domains for test, development and staging. 

    Regards,
    Spas

    0
    Comment actions Permalink
  • Avatar
    James Whiteley

    Hi Spas

    I have to use ngrok (https://ngrok.com/product) in order to provide a URL for Cookiebot (because I cannot add http://localhost:[PORT NUMBER] as a "Domain name" entry on the "Domains" tab in Cookiebot Settings.

    ngrok will generate a choice of 2 URLs that I can use. They look like this:

    e.g
    http://72455dc9.ngrok.io/
    and
    https://72455dc9.ngrok.io/


    Now...

    Do I add one of these as a Domain name AND also add it as a domain alias (with a Domain mapping which is the same)?

    I cannot get this to work locally at the moment.  There are no cookies found (and I know there should be many present).



    Can you help?

    Thanks

    James

    0
    Comment actions Permalink
  • Hi James,

    I think that the problem comes from the fact that you are using localhost to which Cookiebot has not access. 

    Regards,
    Spas

    0
    Comment actions Permalink
  • Avatar
    Solcon

    Hi Spas,

    I'm setting up the CookieBot plugin. Am I able to test the plugin at all on localhost? Are there some instructions on how to achieve this?

    Regards,

    Jelmer

    1
    Comment actions Permalink
  • Hi Jelmer,

    If you are using premium subscription, it is possible to add internal domains that you use for testing, development and staging (non-production domains) environments. You can add those domains in the table named "Domain alias" under "Settings" on your Cookiebot account admin panel. This is for internal testing purposes only and the banner is therefore clearly marked with "TEST". By using Domain alias you could enable cookie consent on internal domains for test, development and staging. 

    However, localhost is not a real domain and therefore it could not be used as a testing domain alias. By using localhost you could run a local server and test your website but only locally on your compute (it is not accessible from another server or computer). The local machine is defined as "localhost," which gives it an IP address of 127.0.0.1. This is considered a "loopback" address because the information sent to it is routed back to the local machine. 

    Regards,
    Spas

    0
    Comment actions Permalink
  • Avatar
    Solcon

    Hi Spas,

    Sorry for the late response. Thank you for the excellent explanation. I have implemented the plugin on a testing environment and it almost works as we want. But that is for another thread.

    Regards,

    Jelmer

    0
    Comment actions Permalink

Please sign in to leave a comment.