Cookieless analytics headache. How do I get GDPR compliant analytics to work? - cookies

Keep in mind, this is only the second site I've ever built. I'm not a programmer, I'm just good at googling things and following instructions.
The gist of it.
I don't want to have to ask for cookie consent just to know how many visitors my site has. I'm not working for a huge corporate entity which needs the most precise data in the world. All I need is estimative data regarding traffic and maybe to know how many people pushed the "contact us" buttons.
There has to be a way to do this without cookies, but my research has led to two dead ends:
Following Setup Google Analytics without cookies I tried this code
<!-- Google Analytics -->
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'G-C88PM0YJP2', {
'storage': 'none'
});
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<!-- End Google Analytics -->
That got me nowhere. My dashboard registered no data. Chrome analytics debugger extension showed no data. (just for reference, google analytics with the standard script which uses cookies did work when checked with the debugger.)
Fed up with that, I tried Tinyanalytics in their cookieless mode.
<!-- Pixel Code for http://app.tinyanalytics.io/ -->
<script defer src="http://app.tinyanalytics.io/pixel/oaFj0HuEqsS9uMW9"></script>
<!-- END Pixel Code -->
But when I go to look at the data, I'm again getting: "No data available. Did you install the Tracking Code?"
I did install it and have no idea why it isn't working.
Their "Help" section says "step 6. Click on the Verify installation tab and then click the button. If you see an alert box saying that the pixel is installed, then you finished the installation process."
Except I can't find a "Verify installation Tab" anywhere in their interface.
Can you tell why my two attempts have failed and help me get something like tinyanalytics to work? Or can you point me towards better alternatives for free cookieless analytics?
Please note, I'm aware that my host Netlify.com does offer an analytics package for 10$/month. I consider that a last resort. But in my research it appears as though 3rd party cookies are getting deprecated anyway. Is google analytics going cookieless soon? Should I just pay Netlify.com and wait for that?
I wish I could find more alternatives on my own, but if you type the word "analytics" into any search engine, all you get is google analytics because they are so huge.
EDIT: I seem to have unearthed some error messages from my website
Mixed Content: The page at 'https://teatrulcomoara.ro/' was loaded
over HTTPS, but requested an insecure script
'http://app.tinyanalytics.io/pixel/oaFj0HuEqsS9uMW9'. This request has
been blocked; the content must be served over HTTPS. analytics.js:1
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
But this also doesn't check out for me. Tiny analytics asks weather my url is https or http, and I selected https, so why is Tinyanalytics giving me an http tracking code?
I've since added the s in the script. It makes the error go away, but I still don't have analytics
<!-- Pixel Code for http://app.tinyanalytics.io/ -->
<script defer src="https://app.tinyanalytics.io/pixel/oaFj0HuEqsS9uMW9"></script>
<!-- END Pixel Code -->
Thank you in advance for your help.
Here's a link to my site so you can view source in case that helps.

Related

Facebook is considering our website URL as Invalid

When we are trying to add our website URLs
https://taiwan.kisan.app and https://taiwan.kisan.in
in the Facebook advertisement.
We are getting the following error.
Invalid link URL Provided: The link URL https://taiwan.kisan.app used
in the Ad is invalid. Please use a different URL and try again.
(#2490193)
We are not able to understand what is causing this error
as our site has SSL and it can be browsed from the browser
without error.
The site is hosted on Apache, AWS EC2 instance and there is a load balancer before EC2.
How can we fix this?
You can use an URL shortener service like bit.ly to quickly resolve this. You can also have custom URL tag if you want. See Bit.ly Sign Up
You might try running your website through the Facebook Debugger:
https://developers.facebook.com/tools/debug/
This tool was built to help to identify any errors that Facebook is reading from your website, and help provide information on what needs to be fixed to unblock your link.
From there, you can get help from your developers team or from the Facebook Developers team to make your website compliant and help our systems detect it as safe. Click the link below and select "Get Started" to open a support ticket with the Facebook Developers team (this option may not be available for all websites):
https://developers.facebook.com/tools-and-support/
The error may also occur because the URL is already being used by another Facebook page –possibly a forgotten page, previous page, or an unofficial, unverified page that was created by someone else

Google Ad Manager adverts not showing on specific web page, but correct across rest of site

I've been running Google Ad Manager on a client's website - https://www.thewire.co.uk since 2012 without issue until July 2020 when suddenly adverts stopped appearing on the home page, though they still appear on the rest of the site. I did a deep dive into the issue at the time and could find not clear problem or solution. It's not been an issue for most of the last year, but now we need to resolve it.
What's odd is that the adverts appear if I visit the same page via a different URL, eg, https://www.thewire.co.uk/?foo=bar (query string is ignored by server) or https://www.thewire.co.uk/home/ (this is serving the same page from a different uri)
All the adverts we serve are line items we load up to Ad Manager directly - we don't use adsense. We have some in house adverts running which are set to deliver when specific slots aren't loaded, so for instance there is a leaderboard at the top of every page which should always have an advert. MPUs on the right hand column are set to collapse if no advert is picked.
When I check delivery using Ad Manager debug tool I am informed adverts are delivering correctly, and the adverts show. But in normal viewing it is not.
This is happening consistently across browsers, devices and with/without ad blockers installed, and on 'vanilla' systems running on new ISP networks across several countries, which I believe counters out any limits that may be created by cookies and IP addresses or location.
I've scoured the Google Ad Manager settings in case some form of serving block was in place, but I've found nothing, and no notifications of any limitations on our home page URL, so I'm completely stumped as to why.
I've checked the google tags and embed codes on our site and they are all OK - they are pulled from a template which is used consistently across the site, and they obviously work when I look at the same HTML via a different context, which leads me to believe the issue is some blocking in place for the specific https://www.thewire.co.uk url from Google's side.
Has anyone had any similar issue and have advise on how to resolve or able to point me to somewhere in google I can get specific support for this issue? Searches through help and the support forums have turned up nothing.
There are numerous work arounds I could apply (eg an http 301 or 302 redirect / to /home/ ) but I really want to solve the problem, not work round it only for it to arise again.
There's a previous topic on StackOverflow - Google Ads not showing on my home page - but that shows no resolution. So posting this maybe the same issue in case my necromancy on that doesn't work. The solutions linked in the comments on that post are either outdated or don't work.

Auto refresh Tableau online dashboard using "Auto refresh" Chrome extension

I've created a view in tableau online using a live connection. I want to the page to refresh automaticly every 10 minutes. It can only be done by pressing manually the refresh button in the dashboard/view in tableau online, refreshing the browser page wont refresh the dashboard. I saw a tableau discussion with this tip: "Tip: To continually refresh a view, in the <head> section of the web page, add <meta http-equiv="refresh" content="#">, where # is the number of seconds between refreshes." How can I do this? Can this be done in tableau online?
As a second option I can add parameters to the dashboard URL to fix this issue. I saw this in this discussion: https://community.tableau.com/thread/289924 At least the part ":refresh=yes" had to be added to the URL. Since I'm totally unknown in this area I was not able to fix this. Where and how I need to add this to the url so this will permantly works?
I'm also open for other suggestions.
There are a couple of ways you could approach this, which one you choose will depend on your situation, scale, and available resources.
Option 1: Embed with meta tag
This is the first option you were describing. In order to do this, you will need to embed your dashboard into your own custom separate webpage. You can get the embed code from the share button on any dashboard and can customize it using parameters and the JavaScript Embedding API. The meta tag you mentioned would then go in the header of your custom webpage where you are embedding the dashboard. So it would look something like this:
<html>
<head>
<meta http-equiv="refresh" content="600">
</head>
<body>
<script>
// Your embed code from the dashboard here
</script>
</body>
</html>
You would also want to make sure to include the :refresh tag you mentioned so you always get the latest data.
Pros: Anyone can open the page and have an auto-refreshing dashboard without installing anything.
Cons: You will need to have some form of a webserver to host your custom page. Requires some coding. Hard to scale up the number of dashboards.
Option 2: Chrome Extension
This is the second option you were describing. In this case, a chrome extension in the browser is refreshing the page for you. That means you don't need your own separate webpage. However, it will only work on the browser you install and setup the extension on. It looks like there are a couple of auto-refresh extensions in the chrome web store you can choose from. You would need to configure them to refresh the page, again make sure to include the :refresh tag on the url.
Pros: Don't need a separate webserver. No coding. Easy to scale for multiple dashboards.
Cons: Only works for the browser that the chrome extension is installed on.
Option 3: Dashboard extension
One option you didn't mention but I think is the best would be to use a Dashboard Extension. Dashboard extensions are web apps that you can bring directly into the dashboard. We currently have an Auto-Refresh extension in the gallery built for just this purpose. Once you've downloaded it simply open your dashboard, drag in a new extension object, select the downloaded file and configure for 10 minutes.
Pros: Don't need a separate webserver. No coding. Easy to scale for multiple dashboards. Anyone can open the dashboard and have it auto-refreshing without installing anything.
Cons: Auto-Refresh only works with 2019.4+.
Hope this helps!

Rails 4, Turbolinks, and Google Analytics - Tracking async modal clicks invalidates regular tracking

I have set up Google Analytics tracking in my Rails 4 app with help from this SO answer. Page tracking is working just fine.
In my app, users can click on a link, and a Bootstrap modal will pop up. I want to track whenever the modal pops up, so I added this code to my js.erb file:
<% if Rails.env.production? %>
ga('send', 'pageview', '<%= "#{resource_path(#resource)}_modal" %>');
<% end %>
This is properly tracking all modal clicks, but now my regular page tracking doesn't seem to be working. Is there a way I can get both to work?
EDIT #1:
After doing some debugging with an alert instead of a ga call, I found out that all of my code was indeed being executed. Now I'm thinking the ga object is having issues. Do I need to create a new object for Google Analytics in my js.erb file since it's not in the head of my HTML page with the rest of the Google Analytics code?
Any insight would be greatly appreciated.
EDIT #2:
I found this troubleshooting guide from Google, and it provides some tips on how to debug your website's analytics. The guide also contains a link to a Google Chrome extension called Google Analytics Tracking Code Debugger, which helps you troubleshoot tracking code issues. I'm using it now (it's great), and it seems that my regular page requests are not being tracked while my modal requests ARE going through. It seems like I have to make some code changes.
Well, after all that debugging, it seems that the precompiled assets weren't being updated on my production server for whatever reason. I'm not sure why they weren't being updated before, but after about 10 rake asset:clean and rake asset:precompile commands, the assets are now updated. Google Analytics is working great for all page views and modal clicks now!

How can I get review-rank in the Amazon Product Advertising API?

Using the Amazon API it seems that it's not possible anymore to get the review rank information of a product. Checking this link the note says:
As of November 8, 2010, only the iframe URL is returned in the request
content.
However, testing with the params they suggest to get the Iframe, but it seems that now even the Iframe doesn't work anymore. Thus, even in the latest API Reference in the chapter "Motivating Customers to Buy" the part "reviews" is completely missing.
However: Since I'm also very interested if it's still possible somehow to get the review rank information - maybe even not using the Amazon API but a competitor's API to get review rank information - I hope someone can provide something helpful on this topic.
Preamble: I'm not sure that I understand exactly what you are looking for here but I'll share my findings anyways.
I was able to retrieve the iframe URL for the reviews and was able to see the reviews iframe after embedding it into an .html page. I used the following attributes to retrieve the iframe URL:
Operation=ItemLookup&
ItemId=1451648537&
ResponseGroup=Reviews&
TruncateReviewsAt="256"&
IncludeReviewsSummary="False"&
Version=2011-08-01 <= important: can't be less than this version
AssociateTag=<YourAssociateTag> <= required when using this version, can be anything (not verified by Amazon)
The relevant part of the response:
<Item>
<ASIN>1451648537</ASIN>
<CustomerReviews>
<IFrameURL>http://www.amazon.com/reviews/iframe?akid=<YourAmazonKey>&alinkCode=xm2&asin=1451648537&atag=<YourAssociateTag>&exp=2012-01-06T02%3A10%3A38Z&summary=0&truncate=256&v=2&sig=kjWPue1N75%2FiI1hW67XYApWxnKeT2tlT%2FJ1rw4WLlUo%3D</IFrameURL>
<HasReviews>true</HasReviews>
</CustomerReviews>
</Item>
Note that you will not be able to use this iframe URL due to the fact that (1) I've removed my Amazon Key and the Associate Tag that was used to create the signature and (2) it expires 24 hours after the call.
If you use the same attributes that I've used, paying close attention to the Version and AssociateTag fields, you will get a result with an iframe URL included.
I then embedded the url in an iframe:
<html>
<body>
<iframe src="http://www.amazon.com/reviews/iframe?akid=<YourAmazonKey>&alinkCode=xm2&asin=1451648537&atag=<YourAssociateTag>&exp=2012-01-06T02%3A10%3A38Z&summary=0&truncate=256&v=2&sig=kjWPue1N75%2FiI1hW67XYApWxnKeT2tlT%2FJ1rw4WLlUo%3D"/>
</body>
</html>
Which looked like the following:
As I said in the preamble, I'm unsure if this is what you are looking for since the requirements for the bounty was:
...to get access to amazons reviewrank informations
This isn't exactly the review rank information but the actual reviews and I take the meaning of review rank info to be more along the lines of the data itself (such as 100 reviews # 4 stars etc.). However, in your question you stated that the iframe did not work:
However, testing with the params they suggest to get the Iframe, but it seems that now even the Iframe doesn't work anymore.
So I thought that I would at least provide you with the proper method of getting and using the iframe.
Amazon has completely removed support for accessing rating/review information from their API. The docs mention a Response Element in the form of customer rating, but that doesn't work either.
Google shopping using Viewpoints for some reviews. I came across a good article for this
I know you said you don't want to screen scrape, but as that is the only solution available, I have been using the screen scraping solution for some time and it has not caused me a problem yet, although I agree it is fragile. If my screen scraping code does not get what it expects, it will log an error for me to adjust the code, and it will degrade gracefully to just display a link to open the review information in an iFrame. This error has yet to trigger and the solution has worked great for us.