Google adsense reference - php

My client has a Google Adsense account and one ad-campaign with several ads under it.
The client needs to identify the incoming users who come through clicking each ad.
The client uses Drupal PHP site.
Is there a possibility to track incoming users who come through Google ads?

Use Google Analytics. From the Features page:
Integrated with AdWords and AdSense
Optimize your AdWords performance with post-click data on your keywords, search queries, match type and more. AdSense reports show publishers which site content generates the most revenue.

You can add arguments to the urls used in the adds:
http://example.com
changed to
http://example.com?google=ad123
You can then in your Drupal check for the presence of the google argument in the $_REQUEST variable and act accordingly. This should be done in hook_boot.

http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html
You may use events, and you may add custom parameters to them, but they didn't work for me on the first shot and i gave up. If you figure out how to use them please post a story on how you did that:)

Related

Remove unwanted email address from URL

I'm running a site that has google adsense advertisements on it, and they recently notified me that I'm passing PII (Personally Identifiable Information) to them. This came as a surprise, since I intentionally designed the site to avoid doing that and have come to find out that some users are not following the directions on the website for referring traffic and are inputting their EMAIL ADDRESSES instead of their referral numbers.
For example, they should be using http://www.scratch4satoshis.com/?r=2127
but instead are using http://www.scratch4satoshis.com/?r=redacted#sample.com and so, the traffic they send there are shown google ads and if they click them, pass that PII along to google and now they're threatening to close my adsense account.
The site is written in PHP; I'm wondering if there is a way to modify the information being passed to Google Adsense?
Try to filter get parameter as integer values:
$r = intval($_GET['r']);

flow of scraping a site

I want to scrape base on users' input but unlucky the site doesn't have good built-in search function. The webmaster of the site use google custom search to replace its default search function. The results are flawless, like user search shoe Kobe 2014, the google custom search will able to give the correct page, then I can scrape the page.
However, on scraping from the search engine result, it has many limitation, like Google's API has to pay if u more request, same goes to Bing API.
Have you tried contacting the site's owner? Afterall it's their information you're using.

Simplest way to get data from Google Analytics?

I am building a service like Wix.com, users can build simple mutli-pages website with ease. Every website will be including in a global Google Analytics account with a unique profile, then the tracking code is to be placed in the website pages.
Now, on the website dashboard i want to show the online visitors and the total number of visists for the website for each website separatly, trying to do so i have :
Tried using GAPI (http://code.google.com/p/gapi-google-analytics-php-interface/) but due to Google Analytics major update it doesn't work anymore.
I found Google Core reporting API for Analytics, but i believe it's made for 3rd party applications that accesses GA data for their clients, meaning that the user should have a Google account and GA profile for the website, and the App just connects to the account and retrieves data. And this of course isn't the case here; i can't ask the user to create a Google account and embed the tracking code in the website HTML; else what am i here for ?
Got the picture ? I need the simplest method to do this, no fancy stuff.
PS: Minutes ago i found this: Google Analytics Query Explorer (http://ga-dev-tools.appspot.com/explorer/), it's a 3rd party app that builds custom queries for GA and gives you the link, something like that :
https://www.googleapis.com/analytics/v3/data/ga?ids= (the ID) &dimensions=ga%3AvisitCount&metrics=ga%3Avisitors&segment=gaid%3A%3A-1&start-date=2013-02-01&end-date=2013-02-23&max-results=50
Now, trying to access the URL (thinking; this is easy :) ) the respond is a request for login first :
{"error":{"errors":[{"domain":"global","reason":"required","message":"Login Required","locationType":"header","location":"Authorization"}],"code":401,"message":"Login Required"}}
Thanks in advance.
Unless you have fewer than 50 clients this plan is not going to work the way you're asking for. (There is a limit of 50 profiles per account.)
The client will have to make their own GA number and provide it to you as a setting for their website.
In order to display the customers reports on a dashboard on your site you're also going to have to get them to authorize a GA App you create for access.

Can I add google analytic to an email (both html / text version)?

I am wondering whether i can add google analytic to an email.
I want to check my click rate , open rate of my sent mail. I have done some research on this and I learnt that there is a track code should be useful.
So,
Since now i am sending an html version email, is it possible to add the code into the mail?
Also,
If i want to see the result of it , is it possible i do not need to login to the google page, but connect to their server and retrieve the result and show them on my php page?
Thank you
I would say NO on this question. You could of course add the Google Analytics script-snippet to your HTML email, but I believe most e-mail clients will block the JavaScript for security reasons. Thus leaving you with inaccurate data, at best.
In your case, if you don't want to send your mails through MailChimp or some other third party service that does the tracking for you (they track both openings and clicks), I would implement my own "simple" tracking system. Each link in the email re-directs through a page that you are in control of, where you track the click and then redirect the user to the appropriate address.
Update
About getting data from your Google Analytics account, I believe you can use the Analytics Reporting API. Haven't tried it myself, but it sounds like what you are needing.
Yes , when you are sending the HTML code to the client , enclose an analytics snippet in the FOOTER of your page. That should do it. However you cannot modify the code.
You can use Google Analytics tracking code, but you will see the "visits" only.
"Visits" => When a user opens an email of you (and of course to be connected to internet)
I think this code will not work inside Outlook.
To see the results, you need to login into your Google Analytics account.
PS: Be sure to setup a valid analytics tracking code.
You can only track link-clicks with Google Analytics if your target site has the Analytics Code in it:
You can read about it here:
http://analytics.blogspot.com/2009/03/tips-for-tracking-email-marketing.html
Yes it is possible to use google analytic's to track open rates.
If you have a pure text version of a email no it is not possible to track it as it need a call to a image so it is only possible using a html version. No you do not try and embed the standard javascript for the tracking you make a direct call to the tracking gif.
There was a free service that did do this
http://web.archive.org/web/20100828084217/http://email-tracking-with-google-analytics.com/index.php

php class for seo

I recently use the great php class call : Google Analytics PHP API. I manage to get it working to get a lot of info and stats for my 25+ website that have analytic
Now i like to get more data like
The page rank the google placement
(where i am on google #325 or #520)
Google Page Rank
Google Indexed Pages
Traffic Rank
Inbound Links
DMOZ Directory
Yahoo! Directory
get a summary (my way) much more like http://websitegrader.com
do you know a php class to do that ?
I guarantee you're not going to find one "class" that does all that for you.
Manually checking your site's rank on Alexa is probably going to be your best source of information on top of what Google Analytics is already giving you.
Google Analytics does NOT require any sort of API.
The site you linked to asks for your Google username/password. I'm flagging this question. I encourage others to do the same.
you can get all from alexa api (Alexa Web Services)
http://aws.amazon.com/awis/
but not free
$0.00015 per request ($0.15 for 1,000 requests)
i thought in the past to build a website to arrange an Arab sites
but arrived at the checkpoint
somme website use awis
www.statbrain.com
www.websiteoutlook.com
www.websitevaluecalculator.com

Categories