Skip to main content

Troubleshooting

Having issues deploying your widget?

Here are a few tips and tricks to help you along the way.

Troubleshooting Wordpress

When it comes to wordpress, it is reccommended to use our cookiego plugin. However, there may be cases in which you need to upload the plugin manually to your wordpress page. Below are a few examples that demonstrate how to manually upload your widget to your wordpress site (without using the plugin).

Header Upload

If you cannot use the cookiego plugin and do have to manually paste the code snippet into a wordpress site, this would be the reccommended way to do it. First, open up your wordpress dashboard and navigate to the code snippets dropdown. From there, select Headers and Footers. Navigate to the text box labeled Headers, paste in your code snippet, and deploy the update. Below is a screenshot that demonstrates what this step looks like.

Upload Snippet

File Edditor

First, open up your wordpress dashboard and navigate to the appearance dropdown. Once you have the dropdown open, select Theme File Edditor. From this page, you want to locate the header.php file. This is where we'll be adding the code snippet.

Once you have the header.php file open, on the top of the file you should see an html tag called <head> </head>. We want to paste the code snippet in between the two <head> tags as seen in the image below.

Upload Snippet

Once you've pasted the snippet into the header, select the Update File button on the bottom of the page and the widget will be published to your site.

Manual Deployment

In the past, we've had cases where users modified their code snippet before deploying. Please make suer that the code snippet you use is directly from one of our team members, cookiego, or the privacy lock application. This is important because if you modify the widget it will not function as intended.

Below is ann example code snippet for our widget. For the sake of demonstration, I've removed the values that make the code snippet functional. Specifically, I would like to draw attention to the + in the widget. This is seen before each use of the encodeURIComponent variable. The + symbol is essential to the widget, do not remove it.

<!-- Privacy Cookies Tag Manager -->
<script>(function(<VARIABLES>){w['Privacy-Lock-Widget']=o;w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments)};js=d.createElement(s);fjs=d.getElementsByTagName(s)[0];js.id=o;js.src=f+'?e='+encodeURIComponent('u/<SOME CODE')+'&iv='+encodeURIComponent('<COMPONENT VALUE>');js.async=1;fjs.parentNode.insertBefore(js,fjs);}(window,document,'script','cookies-widget-<SAMPLE CODE>','<APP URL>'));</script>
<!-- End Privacy Cookies Tag Manager -->