AWS SNS:How many maximum Registration ID'S/Token ID's can subscribe in AWS SNS? - amazon-sns

How many maximum Registration ID'S/Token ID's can subscribe in AWS SNS?
How I Track Registration ID's/Token ID's STATUS?

Once you have set up a Registration ID or Token ID, it's more generally called a Platform Endpoint.
The maximum number of subscriptions for a single SNS topic is 12 500 000 (source), and each Platform Endpoint counts as one subscriber. You can request an increase to this limit if you need to.
I'm not sure what you mean by tracking their status—there are many attributes that you might consider as 'status'.
You can list all of the subscriptions for a topic using ListSubscriptionsByTopic. This is also the only way to find out if a specific endpoint is subscribed to a specific topic, unless you have the subscription arn.
You can find out if a Platform Endpoint is enabled using GetEndpointAttributes.
You can check on the status of a subscription using GetSubscriptionAttributes.

Related

Importing CRM data with Measurement Protocol: Is it possible to batch send for multiple UserIds?

I'm trying to send data from my CRM to GA via measurement protocol, however I don't understand how to send all my custom dimensions for ALL uids at the same time. Would I have to make hundreds of POST requests?
Also, we are not currently tracking the users of this website on GA, so there is no user ids to make a match, we merely want to have this data available for remarketing in Google Ads.
In this case, would Data Import be the best since we can upload our own IDs via a custom dimension?
Ex
POST /batch HTTP/1.1
Host: www.google-analytics.com
v=1&tid=UA-XXXXX-Y&cid=554&t=pageview&dp=%2Fhome
v=1&tid=UA-XXXXX-Y&cid=555&t=pageview&dp=%2Fhome
v=1&tid=UA-XXXXX-Y&cid=556&t=pageview&dp=%2Fhome
The batching method allows for a max of 20 requests per batch. Each request in the batch is a single hit. Doing something like the following would record Custom dimension 1 for userid 1 2 and 3.
POST /batch HTTP/1.1
Host: www.google-analytics.com
v=1&tid=UA-XXXXX-Y&cid=555&t=pageview&dp=%2Fhome&uid=1&cd1=Customdimension1
v=1&tid=UA-XXXXX-Y&cid=555&t=pageview&dp=%2Fabout&uid=2&cd1=Customdimension1
v=1&tid=UA-XXXXX-Y&cid=555&t=pageview&dp=%2Fcontact&uid=3&cd1=Customdimension1
By using uid it helps Google analytics preform internal processing by the user. If you put the user id as a custom dimension this will not happen as Google analytics doesn't understand that this will be your user id.
User Id
This field is required if Client ID (cid) is not specified in the request. This is intended to be a known identifier for a user provided by the site owner/tracking library user. It must not itself be PII (personally identifiable information). The value should never be persisted in GA cookies or other Analytics provided storage.

What is rate limit of accessing Telegram bot APIs?

I read in the docs that bot can send:
30 messages/second to different chats
1 message per second to the same chat
20 messages per minute to the same group chat
but this is all about sending messages, what about other endpoints? more specifically getChatMembersCount method?
Thanks
I know it's been a long time, but there's a very good resource now - https://limits.tginfo.me/en. There's a Bots section there. Also if you have time you can send pull request to the github repository - https://github.com/tginfo/Telegram-Limits/

The API gives me identical resource-id for two different channels

I am using Google Calendar API and push notifications to add channels and watch those channels for new events that come in. However while tracking weird behavior with mixing calendar accounts and events I found out that the resource ID that the calendar API responded with is the same across two accounts.
I am not sure if this is the culprit yet but this is the definition of resource-ID from docs
X-Goog-Resource-ID - An opaque value that identifies the watched
resource. This ID is stable across API versions.
In my mind this means it should be unique. Resource-ID and channel-ID are a requirement for stopping channels after all.
Examples of identical resource-ID from google for two different accounts
Account 1
X-Goog-Resource-State: exists
X-Goog-Channel-Token: 56cab177e67348d9a17c7502a4bad513
X-Goog-Resource-ID: 8KXz6YKChAJDYMTUo0SoKqV8_7E
X-Goog-Channel-ID: ++7mlvx6pEIsTNeMpMwNLw==
Account 2
X-Goog-Resource-State: exists
X-Goog-Channel-Token: 4535832bc5cf47f7ae3403c404023bfd
X-Goog-Resource-ID: 8KXz6YKChAJDYMTUo0SoKqV8_7E
X-Goog-Channel-ID: mL+HzrG8/EYc7zRZdQ+6yw==
My question is, is this normal behaviour?
The push notifications channel does not provide updates on individual events. It only tells you when the calendar (collection of events) changed.
To find changes to events, you want to look up syncing.
With syncing, you send in a token you got from the last time you synced to the List API endpoint. Instead of listing all events, it will list only the ones that changed since your last since request, represented by the sync token.
You can POST to the List API any time you want to get changes to events, but the push notifications you described help tell you when there would be a meaningful change to call the sync.

Onesignal push notification advanced targeting

I'm using onesignal to handle pish notification for both my web and ionic app. My question is
Can I setup user segments using server rest api ?
I want to give my users ability to subscribe to specific events (channels) to limit push notifications they receive.
Example
user1 subscribed to group I'd (1,3,8)
user2 groups(5,8,11)
User3 groups(12,13)
When event happened on groups 8.
How can I send push notifications to all users subscribed to group 8 ? -in my example above notification should be sent to user1 & user2 but not 3.
(Update: This answer is now out of date because OneSignal now supports dynamically creating segments, as well as a large range of additional capabilities introduced over the years)
OneSignal doesn't currently support dynamically creating segments through the API, however there is a better way to do what you need.
You can use the tags feature to assign custom data to users, and then you can deliver notifications to users who match specific tags. Tags are typically set by calling the SetTags method in your app, but they can also be set through the OneSignal API.
In your case, for instance, you would assign the following tags to each user:
User1 Tags: group1=true,group3=true,group8=true
User2 Tags: group5=true,group8=true,group3=true
User3 Tags: group12=true,group13=true
Next, through the OneSignal API, you can use the "tags" field to only deliver your notifications to users who match one or more tags.
You could also create a segment for each tag on the dashboard, then through the API or through the dashboard you could specify which segments (and therefore tags) should receive your notification.
The problem with the approach outlined by #Gdeglin is that you will need to manage your group information on both your server and OneSignal's. When you have 2 sources of truth for something as complex and dynamic as groups you're bound to run into trouble.
For example, what happens if Group 8 is deleted? In addition to updating your own database, you'd need to use the API to update all the OneSignal users who belonged to Group 8. Imagine that group contains 1000 users. Yuck.
Instead of adding groupname tags, add a "userId" tag to each user (Player) registered with OneSignal. Now when a group changes there is nothing to update with OneSignal.
The tradeoff is that sending a message to everyone in the group requires N API calls to OneSignal instead of just one. It looks like it's possible to supply multiple tag matches in a single API call, but it's not clear how well that scales.

List of clientIds of active users with Google Analytics API

I'm looking for a way to get the list of client ids of users that are currently on the website. Realtime reporting API seems to be giving just the metrics like the number of currently active users.
Is there any way to get actual client ids?
No, you cannot get that information with the Realtime Reporting API. Here is a list of all the dimensions and metrics that API allows you to query:
https://developers.google.com/analytics/devguides/reporting/realtime/dimsmets/
To expand on this a bit, none of the reporting APIs give you access to the client ID. You can, however, store the client ID in a custom dimension and send that along with all your hits. This will give you access to the client ID through the Core Reporting API, but it still won't give you access through the Realtime Reporting API.

Resources