We have eCommerce tracking from our php backend app, but we found issue where not all events in last year pushed to GA.
We have all data in our DB. Its there options to reset, delete or update collected data on GA and push new from our app with datetime of creation (2018-03-12 13:49:51, ..)?
No, there will be no way for you to add in the old data. Your only option would be mergeing it using date or some identifier using something like google datastudio/powerbi/tableau.
Related
I have CTR, clicks in the Google analytics. I want to get these data via sisense. According to the instruction https://documentation.sisense.com/7-1/managing-data/connectors/google-analytics.htm#gsc.tab=0 I use elastiCube manager to create an ElastiCube. I use google analitics web service to add the data to ElasiCube. I got 27 tables with names like: Traffic By Navigation, Monthly Report, Traffic By Navigation, Monthly Report and so on. By they do not have the fields which I need. I go to google analitics account via Behavior->Events->Overview. I can see "Clicks". How can I get it via sisense?
Here you can find an example for adding event fields with XML: https://support.sisense.com/hc/en-us/community/posts/115007407787-Tracking-Sisense-Usage-Via-Google-Analytics
I want to send these information title, target amount, category, account name to GA for every user who creates a page in our website. And if anyone make transaction on that page I want to generate a revenue of 5% based on the transaction amount for every transaction. I've no clue how to do that.
So far what I've achieved is I set up the service account by following this link and create a custom dimension. Playing with the code snippet I can update the name of the dimension and other things but not sure how to send an object value with all the fields that I need in this custom dimension. My question is if I call this again will it update and replace the old value with the new value? I don't want that. Every time I want to insert a new value in the old value. Shall I need another dimension and what if I want to relate this custom dimension data to ecommerce later on. How can I do that?
try:
analytics.management().customDimensions().update(
accountId='123456',
webPropertyId='UA-123456-1',
customDimensionId='ga:dimension2',
body={
'name': 'Campaign Group',
'scope': 'SESSION',
'active': True
}
).execute()
Can someone please suggest me what should I do here.
you use the measurement protocol to send data to google analytics. The google analytics management api is only for managing your google analytics account.
POST /collect HTTP/1.1
Host: www.google-analytics.com
payload_data
This article should help you achieve what you want.
Basically the custom dimensions in your url should be like cd1, cd2 so on...
https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters?hl=en#customs
Here is a code sample that might help
https://www.simoahava.com/analytics/13-useful-custom-dimensions-for-google-analytics/#23-payload-length
After a solid load of searching I'm still not able to find a way to automate the export of Google Firebase Analytics data.
I need to import a few KPIs in an existing Google Sheet every month.
Isn't there any option to query the Firebase API through the Google Sheet and GET the KPI I need into a cell somehow every month?
There are ways (and even plugins) to do that for Google Analytics data. So I was sure it should be possible for firebase aswell.
To import Firebase analytics data into a Google Spreadsheet, you'll need to go through BigQuery. There's a Google Spreadsheet add-on called OWOX but I couldn't get it to work, so here's how to do it via creating a Google Apps Script:
In Firebase under Project settings (under the gear icon) -> Account Linking : find the BigQuery tile and sign up if you haven't already. This DOES require moving to the Blaze pay-as-you-go plan, but there's a generous amount of free usage in this tier so you're likely to avoid costs, but you do need to provide the usual billing info.
After signing up for Blaze, you'll go back under this Account Linking section and you'll see that BigQuery is now linked to your apps. Click on "Manage Linking" and you'll likely see "Syncing dataset" for awhile... like several hours (note, this page doesn't seem to refresh on its own so you'll have to refresh manually to check status). Once this is complete, you'll be able to access your data via BigQuery on the Google Spreadsheets side.
In your Google Spreadsheet, select Tools -> Script Editor. There's a good starter script here: https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/
In Google Script editor, select Resources -> Advanced Google services and ensure you turn on BigQuery API. Now your script will have access to BigQuery data.
For my needs, I was just trying to get a count of some events in Firebase, so I wrote a function to invoke multiple queries like this:
function runQueries() {
var sql;
// fetch bigQuery data for Firebase app Create Wildlink (bottom row app)
sql = "#standardSQL\nSELECT count(event_dim) as event_count FROM `PROJECTID.TABLENAME.app_events_*`, UNNEST(event_dim) as event WHERE event.name = 'target_event_name'";
runQuery(sql, 1, 1, 'Label 1');
// fetch bigQuery data for Firebase app Share Extension (top row app)
sql = "#standardSQL\nSELECT count(event_dim) as event_count FROM `PROJECTID.TABLENAME.app_events_*`, UNNEST(event_dim) as event WHERE event.name = 'target_event_name_2'";
runQuery(sql, 3, 1, 'Label 2');
Browser.msgBox("Finished updating the results");
}
And then I changed the runQuery function to accept and use those params:
function runQuery(sql, insertRow, insertCol, label) {
...
sheet.getRange(insertRow, insertCol + 1, resultCount, tableRows[0].getF().length).setValues(resultValues);
sheet.getRange(insertRow, insertCol).setValue(label);
A few important notes about this method:
Events don't appear to be imported retroactively. From the moment you tie Firebase to BigQuery you start getting event data, but it doesn't import any old data.
Events are imported into day-parted tables. Note in the example above the wildcard in the table reference to span tables.
The example above uses StandardSQL (which was new to me). Note the #standardSQL\n in the above SQL strings. That changes from the default mode (LegacySQL). I ran into challenges using legacy SQL to get at the data.
Let me help you to deal with the OWOX BI BigQuery Add-on and simplify steps 3 to 6 from the answer above.
First of all, you really need to link BigQuery to your apps (Ian wrote good instruction how to do that in steps 1 and 2).
Then:
Add OWOX BI BigQuery Reports Add-on to your Chrome browser,
Open your Google Sheet, run add-on (Add-ons -> OWOX BI BigQuery Reports -> Add a new report),
Provide the add-on with the access to your BQ tables,
Select your Google BigQuery project in a drop-down list,
And create a new query (once again, Ian provide you with a good example of the query)
You can find some more details about OWOX BI BigQuery add-on in our Help Center. And feel free to write to us via email (bi#owox.com) or in chat - we’ll be happy to answer any of your questions.
Best regards, Eugene
I'm using the following tutorial, http://www.lunametrics.com/blog/2014/03/04/tracking-offline-transactions-universal-analytics/ which tells us how to add a transaction manually using a url like the following:
http://www.google-analytics.com/collect?v=1&tid=UA-123456789-1&cid=75839030.509493873&t=transaction&ti=52ea5aab1f0c2&tr=1100&cd1=52ea5a8bc6a4a
This works ok. However, the eCommerce part of GA does not register a conversion, so it's not possible to use the multi channel funnels report.
I'm wondering is there a way to register a sale similar to how a shopping cart would on a webpage? Would I have to add in the "clientId" for the customer, into the cart so the sale can be recorded against all the other actions in GA?
OR am I doing something wrong? Such as not registering an item? Would this trigger the ecommerce conversion to register?
Either way, somehow the ecommerce tag is not firing, so I can't record multi channel funnels based on clientId
You need save clientId in custom dimensions and in your site (it can be hide field, for example)
If you send transaction with use real clientid (send cid and cd# parameters) = this transaction will be linked with this user and all actions with this cid
On my practice better send t=event&ec=ecommerce&ea=purchase&pa=purchse&item...
With this method I have all data in ecommerce reports
I have a webapp that hosts several thousand subdomain sites under a single Google Analytics property. I'm in the process of upgrading my tracking tags from the old ga.js system to the new analytics.js-based system (Universal Analytics).
In my old setup, when the tracking code got instantiated, I would send a site id to GA as a custom variable. Then, when pulling analytics for my users, I would simply filter on site ID as follows:
https://www.googleapis.com/analytics/v3/data/ga?
ids=ga:76149262&
start-date=2015-01-18&
end-date=2015-01-20&
metrics=ga:visits,ga:pageviews,ga:uniquePageviews,ga:pageviewsPerVisit,ga:bounces&dimensions=ga:date&
filters=ga:customVarValue1==f6853365a940330037c3aceff36de412&
max-results=100
In the new Universal Analytics system, there are no custom variables, as these have been replaced by dimensions. No problem. I've created a new dimension called siteHash and I've been submitting it along with each page request. What's more, I'm able to query this with only one tiny modification to my API request above:
https://www.googleapis.com/analytics/v3/data/ga?
ids=ga:76149262&
start-date=2015-01-18&
end-date=2015-01-20&
metrics=ga:visits,ga:pageviews,ga:uniquePageviews,ga:pageviewsPerVisit,ga:bounces&dimensions=ga:date&
filters=ga:dimension1==f6853365a940330037c3aceff36de412&
max-results=100
As you can see, I've just changed ga:customVarValue1 to ga:dimension1, and everything works.
Here's the issue: Once I push this code change to production, a lot of my sites will start to have a mixture of old data and new data. The old data will be tagged with the custom variable and the new data will be tagged with the new dimension. How can I query on both ga:dimension1 and ga:customVarValue1 at the same time within the same query?
I've tried creating an "OR" query as described here: https://developers.google.com/analytics/devguides/reporting/core/v3/reference#OR
This yields a filter parameter that looks like this:
ga:dimension1==f6853365a940330037c3aceff36de412,ga:customVarValue1==f6853365a940330037c3aceff36de412
Unfortunately, doing an API request with this filter yields no data. Does anyone know why? Is there a prohibition on filtering on dimensions and custom variables at the same time?
Assuming this is, for some reason, impossible. Is there any way to convert already collected custom variable data into dimension data? If I were able to do this, I could just query the API and only filter on dimensions since all of the old custom variable data would now be dimension data.