My client send me spreadsheet that contains all the transactions. Now I have to push those sheet data in Google Analytics, So How can I push those data in Google Analytics? Should I have to create a PHP Script that will read from spreadsheet and push to Google Analytics?
Depending upon how this data looks. You should look into the Measurement protocol which will allow you to send additional hits to Google analytics make sure that you check the qt parameter which will allow you to set the time that the hit came in. There is no library for this you will have to code these calls yourself.
In the even that this is custom data then you could also upload it directly. You can use the Google api php client library for this to help you with your calls.
In either case yes your going to have to read the speedsheet yourself and then create the code in which ever language you choose to upload it.
Related
Context: I wish to collect real-time, hit-level clickstream data from a website that will ideally pushed into an AWS kinesis data stream (or elsewhere). This is to build a machine learning software for a client that already has Adobe analytics and Google analytics implemented on their website.
Question: Instead of building a tracking code that tracks the clickstream data and pushes it to our own AWS Kinesis data stream or some form of storage under our control, the goal is to piggy-back the tracking code (already implemented by Adobe and Google analytics) that sends a duplicate of the tracked data directly into an AWS kinesis stream. I understand that there are ways to export certain a certain granularity of data from google and adobe analytics (once it's already arrived in these platforms) but these export options don't really satisfy the requirement of raw, unprocessed, hit-level, real-time clickstream data.
Is it possible to modify the tracking code in a way that a duplicate of the tracked data can be redirected to a custom route, ideally AWS Kinesis?
As I understand it, the analytics tracking code is essentially Javascript code (tag) embedded in the website that imports a method from a URL that does the event tracking and the uploading. If I could redirect the data at this point in the already implemented analytics stage then I could get the real-time raw data that I need.
I haven't figured out a way to create and redirect a duplicate of the tracked data by modification of this tag. I doubt the imported method is customisable if it is imported from an adobe or google automatically created URL?
Any detailed answers or even links to information would be helpful,
Thanks.
Is it possible to make a platform where client can sign up and log in using their Google accounts, and accept that their Google Analytics data will be used for calculations.
They should accept the use only once, and then the program should download and process the Google Analytics data every day.
Please point me in the correct direction for documentation
Yes, you need to create a project in Google Cloud Platform, then go to : API and Services > Library > Google Analytics API. (This is to get analytics from an user). Then you need to create a project inside Firebase, allowing email authentication and you will be able to do your task.
I trying to find a better solution than google analytics to create dashboards for visually representing custom data.
My use case is that I need something to track and record custom data that is not passed in through custom web events into google analytics.
I was able to find a hacky solution to the problem initially by running a periodic function over my data on firebase and sending it as custom events to google-analytics. (I mention the approach in this answer. The linked blog post gives further details.)
The problem that I faced was that it wasn't always reliable as although the function did run successfully every day, the data was not shown in the google analytics dashboard.
The data I to visualize is gathered as further insights by writing basic code on existing data
I am aware that it is possible to integrate google analytics for various use cases like even the smallest button click, but I am trying to either send custom events( raised outside of the application by running cron jobs or scheduled functions ) through some API call or maybe directly save and update the data in some other place where there is direct access to visualization
Does anyone know a better solution?
The Google Analytics Measurement Protocol allows developers to make HTTP requests to send raw user interaction data directly to Google Analytics servers, so you can use it to send your data generate outside your application:
https://developers.google.com/analytics/devguides/collection/protocol/v1
I need to test some things with a Google Analytics View, but the default demo account that Google offers does not allow user to use the Analytics Reporting API :
You cannot use the demo account with the Analytics Reporting API. Attempts to do so result in a permissions error: (403) insufficientPermissions.
Source
I just need to replicate a view with different data already.
Thanks for helping.
You cannot replicate views with data. A view will always start empty.
However you can simply register a Google Analytics account and send lots of bogus data (either by setting up a web page with tracking code and call it repeatedly, or set a cron job to fire call via the measurement protocol) (this will happen in realtime, so you need to wait a few days before you have enough useable data. There is not way to bulk-create hits for a longer timeframe).
If you just want to test the API it probably matter that much what data you use, so a mock account should work just fine.
I have a question to the following case. We want to track a content platform using google tag manager. However, not every time the platform is online but GTM would send data to our internal server. Therefore our concern is if data collected during this offline period will be kept or if we loose them.
Do you know if there is some period during which data collected offline through Google Tag Manager is kept and once it gets online then it is sent to Google Analytics?
Thank you,
Lukas
No, that is not how Google Tag Manager works. GTM for web is basically a javascript injection engine. It bundles your configured tags,triggers and variables with a selector engine and injects that into your page. There is no serverside component that stores data.
I'm sure one could come up with a solution to your problem - e.g. store your data with localstorage in the browser, poll you server to see if it is available, and when it's online send the data with a queue time parameter to Google Analytics. However that has nothing to do with GTM.
Having said this, it is hard to understand your use case - if your server is offline, then where does the data come from ?
If you have an offline PWA app (with a Service Worker), you can use the Workbox Google Analytics module to handle the collection of data, and to report it upstream when your site comes back online.
This module has a service worker fetch handler that intercepts the calls that you would make with analytics.js or gtag.js, and stores your data locally in IndexDB in the event that the call fails because it is offline.