GAM + Prebid - Ads load slowly - google-ad-manager

The lower-level ads in the article load slowly. This is probably because I have lazy bidding on for BTF AdUnits.
How do you get it resolved?
Immediately when the page loads, do you send a prebid request for all AdUnits that are on the page or do you use some kind of lazy bidding?

Related

Server-side PageView events not counting as Landing page views in ads

We have bunch of FB campaigns running and none of them are showing any landing page views. Other metrics such as purchases, add to cart, content views, etc are being shown correctly.
Example of tracked data:
Hover info on results showing all tracked actions
Example of Landing page views being empty, yet showing content views + website purchases:
Landing page views not tracked
I can see all the events (including the PageView) in the events manager are being received successfully. I can also confirm that both fbp and fbc parameters are there.
The catch:
We are running purely server side integration to track everything through the Conversion API . We do it through our custom server-side GTM module. We do not have browser Meta Pixel installed at all. We generate our own fbp value and use fbc value from the fbclid GET param whenever they land on our site after clicking the FB ad.
All in all - it has been working great and tracking everything. The events manager does show all events with all the required data. The fbp and fbc parameters are being passed on correctly.
To make this even more weirder - the landing page views statistics were working and being tracked correctly up until July 28th where it suddenly stopped and since then there is no data for it. We have not had any changes to any areas in our setup (webshop / facebook / tracking setup in general) around this time, so my assumption is that Facebook changed something on their end.
Has anyone encountered any similar issues or run a similar tracking setup (pure server side via Conversions API) and have the Landing page views column showing correct data in the Ads Manager - Campaigns?
Any ideas/help is appreciated.

How to use django signals to refresh a specific page

I am creating an ecommerce webapp and I want to update my admin page when user place order. After research i found out about Django signals, but it seems pretty confusing. The idea behind this is that, when a user places an order I want the admin page to be refreshed and show the latest updates. I tried ajax but javascript can only work with the current open page. Can anyone help me with usibg django signals this way?
I think you misunderstand a little, if your idea is that the admin page viewed by the user in a browser is to be refreshed. The page viewed by a site visitor is retrieved on demand of the browser. The user could refresh a page, or a page script may auto-refresh on a timer (this is not a very good solution, but it is easy).
Django can't make the browser update the page.
Signals can cause django to do something in the backend, but they can't solve the problem that the browser is in charge.
There is one technology designed to allow the server to push content to the browser: websockets.
If you use websockets (Django's fairly recent built-in support is called Channels (https://channels.readthedocs.io/en/stable/)), then you can push content to the browser, where a receiving script on the page will do something with it. This is a very powerful technique, but there is a learning curve of some hours if you are starting from scratch.
Recently I came across this front-end library which tries to make this easy as
far as the browser goes: https://htmx.org/docs/
But you still have to deal with running a websocket server and learning how to send messages to a websocket. You will however feel like a superhero at the end of it, so there's that.

Anamoly between google analytics and server hits

I am using Google Analytics on my single page HTML5 application. Though Google Analytics shows Visits as 16k, the number of hits in the server log says the figure is around 3 lac.
I am using the following tracking code in the head section of my page:
<script>
(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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-xxxxxxxx-x', 'example.com');
ga('send', 'pageview');
</script>
What could be the reason for such anamoly or how can I track if the Google Analytics results are correct (using server logs etc) ?
I assume that by "3 lac" you mean three hundred thousand.
First of all visits in GA and hits in a server log file are not comparable since "visits" is an aggregate number that usually includes multiple hits.
Secondly the server log tracks requests to the server (including requests for assets like images, css file, js file etc. as well as error pages). Since a page comprises multiple files (html and assets) every pageview will result in multiple hits to the server. Also the server log will track bots and crawlers.
On the other hand Google will track only the request to the page itself (the part that includes the tracking code) and not the assets, and it will no track (in the standard implementation) user agents that do not use javascript. It also won't track users that have opted out from tracking.
Since by now the majority of web traffic is caused by such user agents (search engine crawlers etc.) server logs will show significant more traffic than Google Analytics.
To compare the two you first need to remove calls to asset files and all traffic that is caused by crawlers from the log file. Then you need to compare the correct metric (i.e. Analytics pageviews vs. server log hits, not visits).

What could cause a Django based Facebook Page Tab to take 2 minutes to load?

I have a very simple web page that uses the Facebook Javascript API and is installed as a tab on a Facebook page. When the page is loaded, the only thing it does after calling the usual Facebook init code is to listen to auth.authResponseChange and then show/hide various elements depending on whether the user is logged in or not.
If I load this page, via http or https in an ordinary browser session, everything is fine. The page loads reasonably fast.
But if I load the page tab in Facebook, it hangs for about two minutes. Chrome tells me that this wait is due to 'waiting' for my page. But if I watch the access log, I don't see an access request logged until just before the page displays. So it seems like Facebook is masking what is really going on behind the scenes.
I opened a ticket with Facebook, and they replied that this issue was due to my code and reproducible with any POST that contained a signed_response.
After much head scratching and experimentation, I found that adding the following two lines to the view that handles this page fixed it:
if 'signed_request' in request.POST:
pass
So clearly Django 1.3.1 is holding the HTTP session open until you actually read some POST values. Ouch.

Does Facebook support Hash Bang #! Ajax Crawlable Urls?

Does Facebook support Google's ajax crawling specification and, if so, what do you need to do to implement it?
I am trying to get the Facebook "Like" button to work with AJAX crawlable urls as defined here: code.google.com/web/ajaxcrawling/docs/specification.html
I have this url which I can go to directly and it loads. Note the "#!" in the url:
http://www.idkshouldi.com/?#!idkDetails_idkKey=agppZGtzaG91bGRpcmMLEiljb21faWRrc2hvdWxkaV93ZWJfc2VydmVyX2dhZV9vYmpfSWRrVXNlciIDamltDAsSKWNvbV9pZGtzaG91bGRpX3dlYl9zZXJ2ZXJfZ2FlX29ial9JZGtJdGVtGN6kBgw
When I "Like" this page it should crawl this "escaped fragment" url:
http://www.idkshouldi.com/?_escaped_fragment_=idkDetails_idkKey=agppZGtzaG91bGRpcmMLEiljb21faWRrc2hvdWxkaV93ZWJfc2VydmVyX2dhZV9vYmpfSWRrVXNlciIDamltDAsSKWNvbV9pZGtzaG91bGRpX3dlYl9zZXJ2ZXJfZ2FlX29ial9JZGtJdGVtGN6kBgw
Why won't it crawl this page? The Facebook linter is not properly crawling my page. If one uses the Facebook linter tool here: developers.facebook.com/tools/debug
It won't properly crawl an AJAX enabled URL with the "#!" in it. This is Google's specification. What Facebook's lint crawler needs to do is to replace the "#!" with "_escaped_fragment_". It doesn't appear to do that with my AJAX enabled links.
This is also a big problem for me, but unfortunately it appears Facebook does not support this Google URL notation. Facebook's crawler/parser does not translate from hash bang (#!) to an _escaped_fragment_ format URL.
Like you I have tested my page on Facebook's URL linter and it only picks up static Open Graph tags within the dynamic original page, rather than the page-specific Open Graph tags in the _escaped_fragment_ server-side variant of my page. Unfortunately, this means that Facebook sees my Open Graph tags as site-specific, rather than page specific.
It is rather an irony that this appears to be unsupported as Facebook uses this approach itself to allow Google's crawlers to pick up Facebook pages.
One potential workaround, that may help you a little bit, is:
1) Use your _escaped_fragment_ page version in Facebook links
2) Add an automatic redirect to your _escaped_fragment_ variant to the proper version.
This should mean that Facebook will pick up the proper meta tags, and the user will click the link and end up on the correct page. The downside of this approach is that the user has to know the rather ugly _escaped_fragment_ URL. In other words, it will probably only be you that knows it, unless you add some sort of 'generate shareable link' button to your page.
It is surely only a matter of time before Facebook adds support for this as single-page hash bang sites are only going to become more prevalent.