Google Adwords API - php

I just have a quick question to see if this is possible with the Google Adwords API or if there is a better solution / service out there that I could use.
What we need to do is generate a Google Adwords report each month with some statistics. We need the report to automatically pull the following things:
# of clicks
Cost
Average Ad Position
Top 5 Keywords Clicked
Then, it should also compare how it did from the previous month and then provide a graph of the past 6 months activity.
Is this all possible? I am waiting for the adwords login from my company so I can go in and request the key and play around with it but in the mean time I just wanted to ask and see what you guys think. Is something like this difficult or pretty straight forward? Is there maybe a service already out there that does something like this? This will be for over 100 accounts.
What do you guys recommend?

All of this is possible using the API but the API may be overkill. The automated reporting features in Adwords are very customisable and you can have them generated at regular intervals and emailed to you with the data you mention.
You can find info on setting them up here: http://adwords.google.com/support/aw/bin/answer.py?hl=en&answer=12299
I used to have a number of python scripts that would generate all sorts of pretty graphs from the early Adwords API. It wasn't until a few years later I realised the automated reports could do it all and much more.

Try AdWords Scripts. With those, you could write a 30-line piece of Javascript, have it dump the output and graphs into a Google spreadsheet, and automatically execute once a month while emailing you about it. They have a few tutorials on the website that do very similar things.

Related

Google Chat API - PHP

I would like to integrate chat functionality in my PHP website with Google Chat API,
I checked the link https://developers.google.com/hangouts/chat/reference/rest
Here, with these APIs, I want to create rooms between two users, sending messages to each other in a room, but I did not find the right way to do so. are there any preferable docs? (I reviewed official docs, seems not much useful)
If you want to create rooms between users, I recommend you to take a look at spaces. They are the Chat API equivalent of a chatroom. In fact the resource rooms is a special subset of spaces. Then, if you want to create a space you only need to work with spaces.message.create(). Please keep in mind that Chat API is geared towards bots, and bots don't create chatrooms (they are invited by users to existing chatrooms). Feel free to comment on my answer if you have any doubts.

Associate Adwords info with Contacts / Conversions on my website

My company run ads on Adwords for quite a while now.
We provide a special kind of Construction Services.
Since our solution is very complex, some people dont quite understand what we are offering but convert into a contact anyway. This happens because:
1 - They dont read the FAQ, neither the website content.
2 - They are just collecting quotes for a service they need, and just Copy + Paste their question on our Contact Form.
3 - Our service name is very hard to target correctly since the keyword is kind of "open to interpretation" and has a bunch of meanings.
I could exemplify with the keyword but i dont know the exact translation to english.
Anyway, we receive a bunch of Contacts. I can track conversions on AdWords and Analytics, i can see wich campaings, keywords, placements, etc are perfoming well, but here is what i really need:
I need to know where THAT GUY that wrote that stupid question came from.
I need to be able to associate AdWords data with the E-mails i receive trough the Contact Form.
I need to be able to, at the end of the month, collect those 1.000 contacts from my CRM wich are classified as "bad contact" and check where they came from. I could for instance find out that a specific placement in Display Network simply suck, i get conversions, but those conversions are bad. Or maybe a specific keyword simply dont work, people always mistake that for something else.
I need to be able to look at this very good contact that came in and trace it back to exactly what campaign originated it, what keyword, what search term, etc.
At my disposal i have, of course, AdWords resources - i looked everywhere i could not find how to do it with Adwords only.
I also have a CodeIgniter / PHP Website. Maybe there is a way to read AdWords / Analytics cookies.
I also have knoledge to mess up with the Adwords API, in case that helps.
Any help from you guys is welcome.
Sorry for my english - not my first language.
Best regards.
You might try using eCommerce module for analytics. Every time when the conversion is performed, create a new product and fill the fields (SKU, Price, Order ID, etc.) with data you need to identify contact

connecting google analytics data api to dojo charts - php backend

I'm looking at feeding dojo charts with data from google analytics, within a Zend Framework app. Has anyone done this or have any overview as to how I would go about it? I see there is a dojox.data.GoogleSearchStore. Does it make sense to have a dojox.data.GoogleAnalyticsStore and is anyone working on something like this?
I did a project recently doing this exactly - presenting data from the Google Analytics API using Dojo Charts. I'm not sure if the approach I used was the best, but I can at least give you some pointers.
Daniel Hartmann has a proposal for a Zend_Gdata_Analytics component. It hasn't been approved yet however you can find his code on Github and it works perfectly. I used this to get all the data I needed from analytics.
The Google Analytics API itself is quite powerful but it takes a while to get your head round it. Try and understand the difference between dimensions and metrics from Google's docs. It helps if you think of the service as building queries that return a table of data (like SQL), rather than just one value. In this table, each metric you add to the query adds a column of data to the result, and dimensions are used to restrict and group the data overall. So for example:
$ga->newDataQuery()
->addDimension(Zend_Gdata_Analytics_DataQuery::DIMENSION_DATE)
->addMetric(Zend_Gdata_Analytics_DataQuery::METRIC_VISITS)
->addMetric(Zend_Gdata_Analytics_DataQuery::METRIC_VISITORS)
->addMetric(Zend_Gdata_Analytics_DataQuery::METRIC_PAGEVIEWS);
gives you the total visits, visitors and page views for each day.
Analytics sometimes takes a few seconds to respond to queries (especially complex ones) so you'll want to cache the data. In my case I was selecting it at regular intervals by cron and storing it in a database.
On the Dojo side, I don't think dojox.data.GoogleSearchStore will help you. I used a combination of dojo.data.ItemFileWriteStore, dojox.charting.DataSeries and Zend_Dojo_Data, but I don't think my requirements would be typical. I'd suggest starting with the basics - get your graphs working with sample (hardcoded) data before your try and drop in your analytics. There are some tutorials on sitepen.com which I found useful.
Good luck!

Recommend a web service that handles location within a specific radius?

We have a client that wants a store locator on their website. I've been asked to find a webservice that will allow us to send a zipcode as a request and have it return locations within x radius. We found this, but it's maintained by a single person, and doesn't look like it gets updated or supported very well. We're looking for something commercial, ideally that updates their zipcode database at least once per quarter, and that has a well-documented API with PHP accessibility. I won't say price isn't an object, but right now we just want some ideas, and my google-fu has failed me.
I've already posted this over on the webmasters forum, but thought I'd cover my bases and post here too.
I've repurposed this outstanding script to conquor this same challenge. It's free, has been very reliable, and is relatively quick.
In my script, I have addresses stored in the DB. So rather than show a page to enter addresses, I simply pass them as a string and let the magic happen.
He says it in the app, but ensure that if you go this route you get your own Google Maps API. It won't work with his!
If you want to go a bit less technical approach, here's a MySQL query you could run on your locations (you'd have to add lat/long to your DB or setup a GEOCODING service) to give you distance as the crow flies.
Google Maps has a geocoder as well and it geocodes to the specific address.
It's limited to x number of requests but that shouldn't be a big deal if your site is small and if you cache. You can get more requests if you pay.
It can be accessed via javascript or via PHP (and there are several prewritten PHP modules out there)
Link here:
http://code.google.com/apis/maps/documentation/javascript/v2/services.html
(I worked for a company that did upwards of 800,000 requests a day, so it's stable and fast :) )
PostcodeAnywhere has a Store Locator feature - I think it's pay per use, but I've used their other products before and they're very cheap.
http://www.postcodeanywhere.co.uk/store-locator-tool/

How to automatically retrieve current adword spend from google

Does anyone know a guide or tutorial into how to access the Google adwords reports? I'm trying to pull in to my application the advertising spend per day (current to the time of checking or last Google update). I can't quite find the API docs or methods for getting the spend. Does anyone know of any good tutorials? Or can you point me in the right direction? Ideally dev should be in php :)
UPDATE
Using the API is er....at a cost. I'm ideally looking for a way to not have to pay for it! So if there is no "backend" way of doing it for free, then scraping the front end is a possibility I guess...
UPDATE 2
Ignore the above, the cost is so minimal, an API call is enough. But I still can't find the API method to get current or previous spend....
Let us google that for you...
Have you looked at http://google-apility.sourceforge.net?
The query you want I think is this one (includes cost data).

Categories