Send Google Analytics Data to eCommerce Server - asp.net-core

We want to save in our database (custom-developed shop with C# and ASP.NET) where our customers came from to improve our marketing strategies, so:
Is it possible to send google analytics data to the eCommerce server while performing a checkout?

You need to enable the ecommerce option on your google analytics dashboard.
Then, enter the tracking code on the purchase confirmation page.
You can consult the link below:
https://support.google.com/analytics/answer/1009612?hl=en
It is also possible to identify the user's origin to improve their marketing campaigns. Just follow this:
https://support.google.com/analytics/answer/1033173?hl=en

The Real Time Reporting API enables you to request real time data—for example, real time activity on your property.
However you can extract information such as pages and events, not ecommerce data. Therefore you should make sure to track the checkout funnel so that the information is within an event (with category, action and label). At that point you can use the API I indicated.

Related

How would I go about developing a program that automatically sends an email with the tracking number to a customer using EasyPost API?

I'm a fairly new web developer and I have an ecommerce website that integrates EasyPost to create and print shipping labels.
EasyPost has an API. Also, in each shipping label, I see a JavaScript object (I think) that displays buyer_address... "email": "example#gmail.com",, which tells me that the email information is there.
My question is somewhat general in scope: What steps would I need to take to go about creating this automation? The website is built in Webflow, so I don't really have a "codebase" or "repository" to store whatever code is needed to build the automation.
Since the buyer email is making it into EasyPost with integrations already in place, I feel that I could create a simple program that emails the tracking number to the buyer email every time a label is generated, or perhaps when package is shipped, without the program needing to interact with Webflow or other integrations.
I attempted using Zapier, as well as Make.com. Neither worked, and OrderDesk doesn't have a way to send tracking number emails.
It looks like Webflow has some kind of support for Webhooks (https://webflow.com/feature/create-webhooks-from-project-settings). EasyPost offers webhooks for free as an add-on service. Basically, with webhooks, EasyPost would send tracking events to Webflow proactively, but Webflow (or you) would need to manage the logic for what to do with those tracking events after they are delivered.
EasyPost Webhook Guide
I'm unaware of any off the shelf products that could do this for you without writing any code. We have a guide that details how you might accomplish this with Ruby (you could then follow this as an example for any other language): https://www.easypost.com/email-tracking-tutorial
A few suggestions:
Integrate something into Webflow if possible (I'm unfamiliar with the platform so couldn't say).
Build a simple script that runs on a schedule (cronjob) that retrieves your trackers from EasyPost and sends an email to customers if they have not yet received one. To your point, this approach wouldn't require interacting with Webflow at all and could be done with some local code running on a server and just your EasyPost API key.
I've created a simple UI for EasyPost: https://github.com/Justintime50/easypost-tools-ui, it could be interesting to add this particular use-case as a feature to that project. If you're interested, feel free to open an issue on GitHub for the repo listed here and I'd consider it.
You'd use easypost's API webhooks, to detect when shipment tracking information is provided, or package information is updated.
https://www.easypost.com/docs/api#trackers
It looks like it has a lot of states, so you can keep the client updated regarding the package status from the moment the tracking # is assigned;
EZ1000000001 pre_transit
EZ2000000002 in_transit
EZ3000000003 out_for_delivery
EZ4000000004 delivered
EZ5000000005 return_to_sender
EZ6000000006 failure
EZ7000000007 unknown
You can install webhooks from these docs.
To send the email, you can use an automation service e.g. Make to capture those webhook events, and then compose and send an email to that customer. I like MailJet for that purpose, because it has excellent template support and you can send from your own company domain. But there are many email-sending options.
A bigger challenge, maybe, is getting the email address to send to. I didn't spot it glancing through the Trackers or Shipments data structures, and I am primarily seeing physical address info.
If EasyPost is not tracking the customer's email with the shipment, you may have some challenge in that you'd need to capture the client info through Webflow's order webhooks, and then associate that with EasyPost's shipmentid, and store those in a reference table.
Many automation services offer database-like functionality for this purpose, or you could use e.g. google sheets ( columns webflow OrderID, easypost ShipmentID, customer Email ) or airtable for that purpose.
But you'd have to look into the Easypost integration as well, and you may need to make that integration manual so that you can acquire all 3 of those pieces of information at the same point in your business data flow.

Saving additional data when checkout is completed on shopify

I'm not entirely sure how to go about this so i thought i'd ask here.
Context
I have a quiz that people take on my site and when the quiz is completed, a product is recommended based on their quiz results. A customer is now able to buy this recommended product.
What i want to do is to be able to save the quiz response to my external database with the order id as a unique id for quick retrieval later. How would i go about this in Shopify?
Question
Is there a way i can make a POST request when the checkout button is pressed on the checkout page?
Would i have to create a custom checkout to get access to that area?
Thank you
If you're attempting to save to an external database then you'll need to figure out a way to send data from your Shopify frontend to an external app or API, one that will capture the product data and add it to the DB.
To answer your first question, no, you can not hijack the functionality of the checkout button (unless you do so via Javascript).
As for your second question, I don't know what you mean by 'custom checkout' but I'd say you're probably looking in the wrong area for the solution to this.
Shopify's backend is not able to be edited by the merchant themselves and can only be accessed via its various APIs.
How I would do it if I were you is to create that external app, create an endpoint that accepts the product data / adds to the DB and write code on your Shopify front-end to send the data to that endpoint.
Keep in mind that you won't be able to easily identify the customer to whom the product is recommended to unless they are logged in.

Can we query all UPS Shipments at once using API

I know, we have dedicated API documentation for Shipping and different services.
But there is no endpoint to get all UPS Shipments at once using API.
Can anyone provide me the endpoint with example?
Thank you in advance.
I had the same question and after a long email thread with UPS Support they confirmed there is no way to grab historical shipment information.
The only option they gave is maybe using QVM which also has it's limitations.
That would be correct, Quantum View Manage and Quantum View Data would be your best available option to view the outbound information. You can have it build a report with address, name and tracking number. Contact your local UPS Account Representative for in depth details if you would like to explore that option. There is a Quantum View API however it would first need to be setup via your local Rep with the website. You are still manually searching the docs however for the information at hand when reviewing the reports. It will not pull it up or give a simple error if what you are looking for is not found. They just pull information all or nothing.

What do the Google Analytics related API's buy me that the Google Analytics UI cannot achieve?

Long time ago, I took and passed the Google Analytics IQ certification test. At the time, I don't believe there were such things as Core Reporting API, Management API, and Metadata API (and probably some other Google Analytics related API's that I don't know about). Now that I am going through the Google Analytics IQ certification training course again (provided by Google, presented by Justin Curtoni?? I believe that's his name), I found that they now have Core Reporting API, Management API, and Metadata API.
I am a computer programmer by trade; so, I have no problem with programming using these API's. However, what I don't understand is, what do these API's buy me that the Google Analytics UI cannot offer? There is no reason to write a program that utilizes these API's simply because I can do it. To me, the existing Google Analytics UI has a lot of tools, reports, and other features that quite extensive. I am hoping that some of you can help me see something that I am probably missing.
The APIs are primarily for programmatic access. For example, if you need to create 1000 accounts all with the same property/view structure and then maybe add a few view filters to each of those accounts, you'll probably want to use the Management API. Doing that by hand would be a nightmare.
The same thing is true for the reporting API. Maybe you want to set up task that runs every monday morning and reports on the previous weeks data. And maybe you want to display that data on an internal dashboard for your company using some fancy charting library. You'd have to use the API to get the data.
Dashboards (executive summaries; managers often want nice visualizations instead of boring drill-downs)
Custom reports for user groups that do not have a Google Account or are not supposed to have access to full reports (e.g. Affiliates)
advanced filtering and aggregation (GA report cannot do everything)
You can combine analytics data with external data (e.g. you are not allowed to store personally identifiable information within GA; but you might store a custom key that allows you to link analytics data to customer data from you CRM or fulfillment system)
Machine-to-machine communication; I once did tracking for an airline that needed trend data on what people where searching for and what they where actually booking; that data was used to allocate/withdraw resources from busy/lame flights, and part of this was done by hooking up GA to their backend system
Take a look at the GA Partner Page. I would say the primary reason is to "liberate" GA Data from outside of GA itself. As Eike mentions, you can create dashboards and combine this data with other sources for a complete "View" of your online presence.
HI I guess there is no definite answer. Here are some things you can do with the APIs:
Automating AdWords CRO based on keyword ad and campaign performance.
Scoring leads based on Analytics data (Engagement with different items) and external data from a CRM.
Collecting unsampled data using multiple daily queries
Filtering using several dimension.
Tracking conversions for periods longer than supported by AdWords.
Looking at a funnel via segments
Analyzing funnels with non-linear structures
Create more robust alerts
Export data to BigQuery and analyse it together with data from other systems.
Create Machine learning apps for behavioural customizing your site.
Create a dashboard with data from multiple views
Use product recommendation to implements "better together" in an online store.
Automate creation of accounts and properties + their integration in a Hosting provider's console.
Cheers!!

Can you upload data to the Google Analytics API?

There are companies out there that claim to "integrate" data into GA. I know some phone call tracking companies in particular. Is there a way that they are uploading data to GA through the API or are they using some other method that doesn't require that?
There is no upload mechanism into Google Analytics besides manual __utm.gif calls like in the browser. Both Google Analytics APIs (Data Export and Management) are completely Read-Only.
There are a few ways these solutions work, but one of them is to generate a unique identifier for the person calling in to give the person on the other line. That code is linked to their referral information (grabbing from the cookies). Another solution is to have the customer manually input their phone number. That phone number is then dialed by the software and connected to the live person, and in the background the phone number is linked to the source information from the cookies.
Then, the person receiving the call either inputs the code it into the system, or automatically has the user's information, and at the completion of the call, depending on how it is resolved, can generate things like e-commerce transactions or particular pageviews for Goals, so it can generate __utm.gif calls with the relevant campaign and user data appended. As far as Google Analytics is concerned, the request formed is the same user. The only thing that will be different is the User Location (which is fairly inaccurate to begin with.)
ie, if I take the __utm.gif call from my computer, paste it to you, and you click it, Google will see that as an another pageview on this visit, and for most purposes ignore that the differing locations.
Well, Google Analytics works off the a tracking GIF with all kinds of data appended to it, so it can certainly be reproduced by these phone call tracking folks without a problem.
Phone call comes, request the 1x1.gif from google with tracking data suiting your needs, and the hit+data will soon register on GA.
http://www.google-analytics.com/__utm.gif?data-here&account=UA-blah&more-stuff
There are several options to send tracking data to Google analytics.
Use a library which implements the ga.js script server-side
When you use Google Analytics in the way described by Google, you include a script on your website. This script sends data from the visitors browser to the Google Analytics server.
This script has been reverse engineered and implemented in server-side libraries. Now you can send the same data from the server to the Google Analytics server. You can use PHP-GA for PHP or pyga for Python.
Use the Google Analytics measurement protocol
The Google Analytics measurement protocol is a new API to send data to Google Analytics. You can send data by sending POST requests to the API.