Refresh DFP ads - refresh

I have a static chat page with Google DFP ads around it.
Is there a way to get those ads automaticly refresh every 5 minutes or so?
I just want to refresh the ads, not the whole page.
I know that Google offers some tags like googletag.pubads().refresh(); but im not sure if i can use them for this purpose.
Thank you

Check here it is feirly simple:
https://support.google.com/dfp_premium/answer/2694377?hl=en&ref_topic=28788

Yeah just set an interval of 300000 and use the refresh method like you mentioned. Technically I think it may be against the terms of service to refresh the ads on a timer without user interaction... but I'm not 100% on that and you would need to research the terms a bit more on the DFP site.

This code should help:
<html>
<head>
...
</head>
<body>
...
<!-- PUT THESE LINES ON THE FOOT OF YOUR PAGE -->
<script type="text/javascript">
setInterval(function(){googletag.pubads().refresh();}, 300000);});
</script>

Related

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!

How do I display the price from Amazon products with API?

I had my associates account closed by Amazon because I've entered my prices manually and I need to enter them using Product Advertising API so they'll be up to date every time. I just don't know exactly how to use that. I've tried with "Amazon Product in a Post" plugin but it shows the picture too while I'd like it to display just the price. If you guys know how to get rid of the picture or another way to insert the price with API, it would be a life saver.
You can use jQuery to remove picture with class amazon-image-wrapper in you page, and so you keep amazon api plugin:
<script type = "text/javascript">
$("amazon-image-wrapper").remove();
</script>
Don't forget to add jQuery in the head of the page:
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>

Facebook social graph still fetching old values and not the updated ones

I made a new blog post on my website and provided an image for SocialGraph tag:
<meta property="og:image" content="http://i.imgur.com/someOldImage.jpg" />
The image was hosted on imgur, and posted it on the web.
After few minutes I decided to change the image and updated it to the new image that was also uploaded on the imgur. However as far as the html markup is concerned it does show social graph tag values according to the new image.
<meta property="og:image" content="http://i.imgur.com/someNewImage.jpg" />
But when I go to post on facebook the facebook preview shows the imgur error that
the image you request doesn’t exists or no longer available
Which means that FB is still trying to fetch the old image and not the new one even though I have updated it in the markup?
Why is this so, how can I refresh facebook social graph values for the url? Please explain its an important post and this way its like causing an embarrassment?
Go to https://developers.facebook.com/tools/debug
Enter URL and append fbrefresh=CAN_BE_ANYTHING
Example: http://example.com/?fbrefresh=CAN_BE_ANYTHING

People who "liked" my Blogger post?

I have added the following to my Blogger template to add a Like button on each of my Blogger post:
<script>
document.write('<iframe src="http://www.facebook.com/plugins/like.php?href=<data:post.url/>&layout=standard&show_faces=false&width=380&action=like&font=trebuchet+ms&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px"></iframe>');
</script>
My question is, how could I know who exactly has pressed Like as it only display the number of people who have liked my post?
Thank you!
Facebook doesn't provide an API to get a list of people who like a page. This is probably due to privacy issues (although with Facebook you never know their reasonings, they sell your personal information all the time).
My question is, how could I know who exactly has pressed Like as it
only display the number of people who have liked my post?
Force users to log into your website and only then display the like button for them. When you hear the edge.create event fire then log the user who is logged in.

Can anyone tell me what 'fb:admins' could not be parsed as type 'fbid' means?

I am doing my best to set up open graph on my website.
It's all working ok and looking good on Facebook, but I'm getting this error message on my site:
Object at URL 'http://www.thesocialnetworkingacademy.com' of type
'website' is invalid because the given value '159229554128788' for
property 'fb:admins' could not be parsed as type 'fbid'.
Can anyone tell me in fairly basic terms what I need to do to fix that?
Your ID looks like a page ID rather than an admin ID. You need to supply the user ID of one or more admins for this page, or switch to an fb:app_id instead of an fb:admin meta tag.
If you wish to stick with the fb:admin approach you can enter your Facebook username rather than the numeric ID, which is probably easier to debug and manage, you can find your user name on your profile page in the page URL eg if your page is facebook.com/johndoe then your username is johndoe. If you want to get your numeric ID for any reason you can find it by visiting: http://graph.facebook.com/johndoe
You can then check that this is all working by using the Facebook debugger to test your site: http://developers.facebook.com/tools/debug
Using the debugger is the best way to test it - Facebook will take ages to update it's cache of your pages, so you won't see the results of any changes you make for days otherwise.
fb:admins has to be a user ID. This is telling you that the fb:admins value isn't a user ID. You need to put your user ID in there, or use an app ID with fb:app_id
https://developers.facebook.com/docs/opengraph/
I had the same problem.
You need an APP ID for that to work. A website is not an app. You must go to https://developers.facebook.com/apps and create a new APP. After the creation you will recieve an APPID. That is the id that you need.
You can use multiple admin ids AND also an app id if you wish at the same time
<meta property='fb:admins' content='5555555'>
<meta property='fb:admins' content='7777777'>
<meta property='fb:app_id' content='888777555555'>
can find admin id by going to the opengraph page for a user, e.g.
http://graph.facebook.com/gbirbilis
can find app id by going to
https://developers.facebook.com/apps
In fact, lots of websites use fb_appid rather than fb_admins, like this mac video converter site.
If you want to get your fb_admins ID, this page may help you
I had the same problem and the problem was passing the app_id and admin_id like this:
<meta content='{5555555}' property='fb:admins'>
<meta content='{555555555555}' property='fb:app_id'>
And it should be like this:
<meta content='5555555' property='fb:admins'>
<meta content='555555555555' property='fb:app_id'>