I have a web page that is linked to by partners with a URL pattern like so:
mydomain.com?partner=1
I would like to be able to view reports on ad revenue generated by adsense per partner id for revenue sharing purposes. Is there a way for me to provide the partner id to the adsense integration code so that later I can correctly attribute revenue to the appropriate partners?
Perhaps something like this written in on the server side?
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="xxxxxxx"
data-ad-slot="xxxxx"
data-ad-format="auto"
<!-- SEE BELOW -->
data-custom-dimensions="<?=PUBLISHER_ID?>"
<!-- SEE ABOVE -->>
</ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Related
When I load <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>, images on my page get replaced with spam ads of all kinds.
I'm testing bare bones in a guest instance of chrome on my pc.
This is the original code:
<html>
<head>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
</head>
<body>
<img src="/images/ads/mm-mug-wide.jpg" />
</body>
</html>
These are screen shots of the network log with and without the adsense javascript. By the time I killed it, the network log with adsense showed 455 requests over 35 minutes.
With Adsense Javascript: https://18103791804392046531.googlegroups.com/attach/1841b7c6b6b0b5/adsense-network-log-with-adsense.jpg?part=0.3&view=1&vt=ANaJVrFCJMUV-pol5F7XFKcts8bc50qnvFbazg6PVlZXCOCj7PSJXGBJQkoZaU9AzQcs7xh0VS03Q8-pCS9c9iErGlhHCP3mkSWUMeMumfeQPkKkWpanUDU
Without Adsense Javascript: https://18103791804392046531.googlegroups.com/attach/1841b7c6b6b0b5/adsense-network-log-without-adsense.jpg?part=0.2&view=1&vt=ANaJVrHGcOCztReWJmK09Yr0YpkouhCZwxFzmmjfRfk2wyB0Rr9vb30Hl7SkanKF06LcCCxDvElQx4tB_ZQYRxB-96zOY8gXEp_IjL6q6pOzlsSuA4-nQZ8
UPDATE:
It only seems to do it if the word 'ad' or 'ads' ('header' was not a match) appear in the src. If the class is 'ad', it starts loading the spam resources but does not replace the image or continue on indefinitely.
The DNS on my router had been altered to point to a malicious DNS that was rerouting things such as google adsense.
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-6483687610557857",
enable_page_level_ads: true
});
</script>
I am implementing Facebook Instant Articles for my website and have come across the following problem.
Facebook says you can implement any ad code you wish, even Google Double Click for Publishers which uses Adsense as it's default backup when no ads from your current inventory are being served, but the code is inside an iframe as such:
<figure class="op-ad">
<!-- Use this for your ads -->
<iframe src="" height="50" width="320"></iframe>
</figure>
The thing is, I use Google Adsense for my ads and there is a problem with iframes:
http://adsense.blogspot.ro/2011/06/clarifying-our-ad-implementation.html
Anybody know how it's possible to solve this dilemma?
"""Facebook says you can implement any ad code you wish, even Google Double Click for Publishers which uses Adsense as it's default backup."""
You are not allowed to use adsense as the default backup. It is a violation of rule.
AdPlugg can do this. Your tag above would become:
<figure class="op-ad">
<!-- Use this for your ads -->
<iframe src="http://www.adplugg.com/serve/<your_adplugg_access_code>/html/1.1/index.html?zn=fb_zone_1" height="50" width="320"></iframe>
</figure>
You would then drop your AdSense tag into a "Custom" AdPlugg ad and configure it to serve into your "fb_zone_1" AdPlugg Zone (as specified in the example url above).
With this solution, you could rotate other ads (affiliate network, direct buy, etc) into the zone if you wanted. It would also allow you to update your ads without having to update your entire Instant Articles feed.
I posted a blog with more info about how to do it here: Facebook Instant Article Ads
A similar question (which might be of help) was asked/answered here: Add DFP DoubleClick inside a Facebook Instant article
Disclaimer: I work for AdPlugg.
Update: It seems that the current Facebook Instant Articles Policies only allow serving Direct Sold ads or Facebook Audience Network ads. No other ad networks are allowed. Under these policies, you could still use AdPlugg but only to serve ad inventory that you directly sold to Advertisers and not AdSense ads.
you can use your Adsensse tag. It worked fine for me, using a iframe.
Don't forget to use this in the article header:
<meta property="fb:use_automatic_ad_placement" content="true">
Here is a example of the tag:
<figure class="op-ad">
<iframe height="250" style="border:0;margin:0;padding:0;" width="300">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-XXXXXXXXXXXX"
data-ad-slot="XXXXXXXXXXX"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</iframe>
</figure>
Putting a context, your code would be like this:
<!doctype html>
<html lang="pt-br" prefix="op: http://media.facebook.com/op#">
<head>
<meta charset="utf-8">
<link rel="canonical" href="https://yoursite/your-article/">
<meta property="fb:use_automatic_ad_placement" content="true">
<meta property="fb:article_style" content="default">
<meta property="op:markup_version" content="v1.0">
</head>
<body>
<article>
<header>
<!-- cover -->
<figure class="op-ad">
<iframe height="250" style="border:0;margin:0;padding:0;" width="300">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 300x250 - Rodapé Texto -->
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-XXXXXXXXXXXX"
data-ad-slot="XXXXXXXXXXX"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</iframe>
</figure>
<figure>
<img src="https://yoursite/your-article/image.jpg" />
</figure>
<!-- The title and subtitle shown in your Instant Article -->
<h1>Title;</h1>
<!-- author(s) -->
<address>
Writen by <a>Author</a>
</address>
<!-- publication date/time -->
<time class="op-published" datetime="2016-08-16T17:47:42+00:00">16 ago 2016</time>
<!-- modification date/time -->
<time class="op-modified" datetime="2016-08-16T17:47:42+00:00">16 ago 2016</time>
</header>
<!-- Article body goes here (CONTINUE LIKE A NORMAL INSTANT ARTICLE) -->
i have google adsense Account which is activated already.
Now, i am going to place an AD on my blog and i added code into my blog but don't know why i am not able to see that AD on my blog
please help me out !!
Here is My Ad Code :
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9307704483757505"
data-ad-slot="2264250676"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Thanks
I have an oscommerce shopping cart site and I'm trying to set up an automatic redirect with 30-second time-delay from one product page to another product page, and include a message like "this prod. is now replaced by [new catalogue number]. You will be automatically redirected." How do I get into the raw HTML/PHP coding for each product so I can put a redirect meta-tag or javascript coding in? Note: I only want to set up the redirect for a handful of product pages (not all products currently on the site).
<html>
<head>
<script type="text/javascript">
<!--
function delayer(){
window.location = "productpage.php"
}
//-->
</script>
</head>
<body onLoad="setTimeout('delayer()', 5000)">
<h2>Prepare to be redirected!</h2>
<p>This page is a time delay redirect, please update your bookmarks to our new
location!</p>
</body>
</html>
you can use Js redirect look like above
check from here > http://jsfiddle.net/JnUVF/
I am trying to find a walk through on how to register users via facebook onto my site.
The facebook developers site keeps confusing me and I was hoping there where easier tutorials to follow.
Stephen,
It can be a little complicated.
You have to combine the documentation at:
http://developers.facebook.com/docs/guides/web/
http://developers.facebook.com/docs/plugins/registration/
Boiling it down to the simplest case:
<html>
<head>
<title>My Facebook Registration Page</title>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js">
</script>
<script>
FB.init({
appId:'yourAppID', cookie:true,
status:true, xfbml:true
});
</script>
<fb:registration
fields="[{'name':'name'}, {'name':'email'},
{'name':'favorite_car','description':'What is your favorite car?',
'type':'text'}]" redirect-uri="Your processing URL">
</fb:registration>
</body>
</html>
Facebook will return an encrypted form field with all the user data called "signed Request" You will need to decrypt this field with your secret key. There is an PHP example at the bottom of http://developers.facebook.com/docs/plugins/registration/