At the moment i have a full implementation of google analytics in my web client.
Also i managed to track api calls in my backend php api.
But i was searching a lot about how to track more information than the api call.
I mean, i would like to know if there is any way to get information beyond the number of request as i can do with the js api.
Im specially interested in how to track the time the api takes to give the response as i can do for example with the time that the web client takes to get a response.
I tried searching in the ga documentation but i didnt find anything.
Maybe its something that is not supported, but if there is any way to achieve that i would like to know.
Please give some tips.
Thank you!
Related
I'm using the GTM data layer to populate data through the enhanced ecommerce interface of Analytics. The goal is to provide detailed cost data so I can build a dashboard that shows profitability for my business. It's working great on a transaction basis and I am uploading shipping costs, product costs, discounts, and a host of other transaction data. However, my business also has fixed overhead costs. I want to upload that to analytics once per day so I can see the true profitability on a day by day basis. This requires it to be a server-side request from my PHP server. I am unfamiliar with how to set a custom metric from the server side. Does anyone know how I can send this once-per-day data to analytics from the server side? Would I send it as a pageview event? The variable name would be "fixed overhead". I'm not really sure where to start. Thanks in advance!
Sending data server-side to Google Analytics is entirely possible (and admittedly it is pretty daunting if you've not done it before).
The two best resources to use are the Google Analytics Measurement Protocol documentation and the Google Analytics Hit Builder. Use the parameter guide to prep the custom metric data specifically.
Here is my actual snippet that I use for all of my PHP projects (first ~150 lines or so). I'm certain there are better ways to do it, but at the very least it might help you figure out some of the complexities.
It's a lot of info to soak in, but I hope that gets you headed in the right direction!
I've been reading through the eBay Developer Network and for the life of me can't figure out how to do the simple task of retrieving all listings from an eBay User (me) via their API.
Can anyone help me out on achieving this.
Thanks a lot.
Edit:
I have tried using HTTP method of:
http://open.api.ebay.com/Shopping?callname=GetUser&appid=APPID&siteid=3&UserId=USERID
But this hasn't given me any luck.
Mainly with the PHP Methods, I've tried reading up on EBATNS but with no luck could I start coding to produce something small.
I have also looked at Use of eBay API in PHP to retrieve My eBay information and that didn't really help me all that much either.
If anyone needs the answer to this one I have figured it out after a day of research.
http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsAdvanced&SECURITY-APPNAME=PRODUCTION-APPID&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&itemFilter(0).name=Seller&itemFilter(0).value(0)=USERNAME&paginationInput.entriesPerPage=10&keywords=
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!
I've got a couple of affiliate sites and would like to bring together the earnings reports from several Amazon sites into one place, for easier viewing and analysis.
I get the impression that cURL can be used to get external webpage content, which I could then scrape to obtain the necessary info. However, I've hit a wall in trying to log in to the Associates reports using cURL.
Has anyone done this and do you have any advice?
I am working on an open-source project called PHP-OARA it's allows you to get your data from the different networks, it's part of the AffJet Project.
We have solved the problem with Amazon(it wasn't easy) and a PHP class is available to get your data from your associate account.If you like it you can even co-operate to do it better.
I hope it helps!
You can do this, but youll need to make use of cookies with curl: http://www.electrictoolbox.com/php-curl-cookies/ But id be willing to bet some cash that Amazon offers an API to get the data you want, although the last time i dealt with their web services it was a nightmare but proably because i was using the PHP SOAP extension and Amazon SOAP API.
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).