Google Analytics Notification API - api

I would like to create an automate who collects Notifications, those are into the clock icon at the top right, to make a summary at the end of the day through an email.
I was searching but I don't found anything: is existing an API who retrieved the notifications from Google Analytics ?

No there isn't. The only APIs available are listed below, none of them provide notifications information.
https://developers.google.com/analytics/devguides/reporting/core/
https://developers.google.com/analytics/devguides/reporting/embed/
https://developers.google.com/analytics/devguides/reporting/mcf/
https://developers.google.com/analytics/devguides/reporting/realtime/
https://developers.google.com/analytics/devguides/reporting/metadata/
https://developers.google.com/analytics/devguides/config/mgmt
An alternative is to create custom alerts with emails, then use tools like Zapier to process those emails in an automated fashion.

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.

Freshdesk: Automating 'score' emails

Background: I have little coding experience (not API savvy) and would preferably use an automation tool for this but hope for some guidance in the best way to complete the task. '
We need to send a 'response' (number of emails sent by an agent) score at least twice a day to agents so they can gauge their efficiency. As an alternative we can build up a dashboard to enable easy viewing of this information.
Question: How do I go about sending emails to each agents gmail account with the number of responses completed on Freshdesk that day? Can this be done with a Zapier connection to googlesheets and then forming a googlescript? Would it be easier to set up a live dashboard displaying all agents scores and if so how would you recommend doing this?
Sending emails would be tough given that most email clients (gmail, outlook, ...) have stricter rules on what lands in inbox to avoid spamming.
But you can build a dashboard in Freshdesk to show this information. The sdk has default support for most things you'd need.
Here's a blog post of a sample dashbaord app in Freshdesk: https://medium.com/freshworks-developer-blog/building-a-full-page-app-on-freshdesk-5ce17524277f

API Whatsapp to send messages from an external application

I want to implement Whatsapp
to send information from an external application. The idea is to use this
external application to send information throughout Whatsapp.
If you can help me about the terms and
conditions and if this query is possible to develop.
There is a way through which you can send WhatsApp message from your self created application. Use this link Chat API.
But it only provides 3 days trail period and after that you have to purchase it.
The process in that is, you have to register with your google account, then scan the QR code provided(which changes after every 45 seconds). and you are set to go, they will provide you the API for : PHP, Node.JS, Jquery, CURL.
One thing more you always have to keep your phone connected with the internet everytime.
Also I found a drawback in that, i.e. they also provide API to read messages, but it is too slow, as in my condition I can see my messages of yesterday but not of today.

How to get Telegram Bot statistics?

Does exists any way to get bot's statistics with API or with web interface or with BotFather? Or I must to collect statistics by processing updates from bot API?
ps. Currently I store statistics in Redis by processing updates from bot API, but I wish find better way.
As aleix said there is no official support. After several days of research I've found the solutions for all platform bots, including telegram:
Chatbase.com from Google
botanalytics.co (free + paid)
dashbot.io(free up to 10 M messages)
no, there is no official support from Telegram to do that. There are third party analytics like botan, you can get navigate via bot to your bots stats:
Botan.io (seems to be abandoned)
You can see an example here: analytics tool for your telegram Bot
They also have integration to track more data via website:
url-shortening
If it is your bot performance that you worry about and you bot is popular (~300 requests per min), Botfather will monitor the request/response rate and alert you if there is something wrong.
Check the Status alert section in Bot Intro.
no actually you cant! But the easiest way for getting statistics about the users is to save the chat_id to database or into simple txt file.
the best way for that is use php mysql function to insert each chat_id into 1 columns then send it to your chat_id ...!

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.