Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

162
Views
Cookie Write Failed In Chrome Extension when Adding Google Analytics

I have added universal analytics in my chrome extension to get the page views but its throwing the following error on my screen,

ERROR I GET

This is the code that I have used to add Google Analytics to my extension

in manifest file I have added this line

 "content_security_policy": "script-src 'self' https://www.google-analytics.com; object-src 'self'",

and in my JS I have added this code

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics_debug.js','ga');
  
  ga("create", "UA-XXXXXXXXX-1", "auto");

  ga('set', 'checkProtocolTask', null);

  ga('send', 'pageview', '/frame.html');

Don't know which thing is causing problem.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!