I have created a campaign, specified the interests in the ad and successfully executed the campaign which lasted 2 days. I have got around 9 website clicks and the reach was approximately 35000. I am trying to retrieve keyword stats through api but I am getting empty json object. I followed this link.
Here is the cURL command:
url -G -d "access_token=abcd" "https://graph.facebook.com/v2.7/ad_id/keywordstats"
And here is the result:
{"data":[]}
Why am I getting empty json object. Where am I going wrong? I need some assistance.
The keywordstats api only show the breakdown statistics for the ads that resulted in enough stats. In case some interests haven't resulted in any stats, they won't be included in the breakdown statistics .
As a rule of thumb, there is an average delay of 24 hours (before the stats are available). However, we've noticed that it can be less or more as well. Only Facebook will know the exact logic behind that.
Related
I have embedded Amazon QuickSight dashboard in my web application by using amazon-quicksight-embedding-sdk (followed https://learnquicksight.workshop.aws/en/dashboard-embedding.html).
The user session seems to last many hours as mentioned in https://docs.aws.amazon.com/quicksight/latest/APIReference/API_GetDashboardEmbedUrl.html
When I requested the embed URL directly from my web browser, I could see that it was valid for many hours.
But my web app will request a new embed URL when user restarts it (by closing/reopening tab/browser). Does that mean a new user session was created and billed.
Is it possible to store the embed URL and to reuse it (as long as the user session lasts) for the case the same user closes the tab/browser and open the web app and the dashboard again (of course in the same browser)?
I tried to store the embedURL as a cookies named "embed_url". But calling amazon-quicksight-embedding-sdk.embedDashboard({url: embed_url}) resulted in
"Embedding failed because of invalid URL or authorization code. Both
of these must be valid and the authorization code must not be expired
for embedding to work."
I was sure the embed_url was still valid because requesting it by the browser directly worked.
Which "authorization code" is mentioned in the above error message? What did I miss or is it actually not possible?
Beside the billing concern, I've noticed that the call to get the embedURL took time (more than 5 seconds, eu-central-1) while the embedding took less (3 seconds). I thought I could improve the dashboard loading time by reusing the gotten embedURL. Any comments about the timing? Is it normal or did I do something wrong so that it was so slow? My test dashboard has only 1 diagram with unchanged dataset.
As per the Quicksight Pricing Page, if you're creating an embedded dashboard for a Quicksight "Reader", then you're paying $0.30/session per 30-minute logged-in-session for this Reader.
The validity of the session can be set in the SessionLifetimeInMinutes parameter of the GetDashboardEmbedUrl API, and has an upper bound of 600 minutes (10 hours).
As an example, suppose you set SessionLifetimeInMinutes to 600 mins for your Reader user. Also suppose that this user stayed logged in and uses the dashboard for 10 hours continuously, then that would equate to 20 sessions of usage (since the billing is in increments of 30-min chunks). At first glance it would seem that this would cause $0.30/session * 20 session-chunks = $6 to be billed.
However, as per the pricing page, there is an upper bound of $5.00 per month for every Reader. Which means that this Reader can never exceed $5 per month regardless of how many Quicksight sessions (of whatever duration) are created for them. So no matter how many times you call the GetDashboardEmbedUrl API for a given Reader, you're capped to $5/month for this user.
Also of use as to what constitutes a Reader session (from the pricing page):
When does a Reader Session start and end?
A Reader Session starts with user-initiated action (e.g., login, dashboard load, page refresh, drill-down or filtering) and runs for next 30-minutes.
Keeping Amazon QuickSight open in a background browser window/tab does not result in active sessions until the Reader initiates action on page.
But my web app will request a new embed URL when user restarts it (by closing/reopening tab/browser). Does that mean a new user session was created and billed.
I'm not 100% sure about this, but yes I believe a refresh (or open/close) of the tab results in a new session for the same user.
A Reader Session starts with user-initiated action (e.g., login, dashboard load, page refresh, drill-down or filtering) and runs for next 30-minutes.
The above excerpt is from the pricing page. So it does seem that page refresh (and thus another call to GetDashboardEmbedUrl) will trigger a new session for the user.
Which "authorization code" is mentioned in the above error message?
The GetEmbedDashboardUrl API response is a JSON object that looks like this:
{
"Status": 200,
"EmbedUrl": "https://us-east-1.quicksight.aws.amazon.com/embed/f4147cd0d4d_BLAH_BLAH_...",
"RequestId": "c15a7bad-629e-444a-b643-ff3142c9ae41"
}
If you look closer at the EmbedUrl, apart from the dashboard url itself, there are also these query-string parameters:
isauthcode
code
identityprovider
statePersistenceEnabled
potentially: other params too
The code parameter (embedded within the embedUrl) is the "authorization code" that you asked about.
Is it possible to store the embed URL and to reuse it (as long as the user session lasts) for the case the same user closes the tab/browser and open the web app and the dashboard again (of course in the same browser)?
No, that can't be done. As it says in the link you shared:
The following rules apply to the combination of URL and authorization code:
- They must be used together.
- They can be used one time only.
- They are valid for 5 minutes after you run this command.
So the embedURL and its associated auth code can only be used once together. Makes sense since this will prevent MITM replay attacks among other scenarios. Also I actually tried to cache the response and then re-use the embedUrl in case of a cache-hit, since this would improve the end-user experience. But this didn't work - a "replay" of the embedUrl is blocked by QuickSight, as mentioned in their doc.
Any comments about the timing?
This has been our experience also. The GetDashboardEmbedUrl REST API takes around 5-7 seconds (us-east-1) for our app and then the actual embedding takes another 3-5 seconds. Not great, but I don't see a way around this poor user experience as of now.
I'm working with 1 beacon advertising in Eddystone-URL and Eddystone-UID at the same time.
No problem with Eddystone-URL.
With UID, I set up several lines in the google beacon dashboard. With targeting options on all of them.
1 for Monday that opens instagram app, 1 for Tuesday-Sunday 3PM-5PM with a URL. Instagram app for Tuesday-Sunday 12AM-11AM, another URL for some other times of the day and week, etc. Not going into the whole details, it's quite complex.
As an example here is a copy of the raw JSON for one of the lines:
{
"title": "Get a FREE Pop at XXXXXX!",
"url": "https://mybitlylink",
"targeting": [
{
"startTimeOfDay": "15:00",
"endTimeOfDay": "16:59",
"anyOfDaysOfWeek": [
2,
3,
4,
5,
6,
7
]
}
]
}
All my 4 URLs are bitly links so I can track the number of clicks I get on each. I haven't found a way to track the number of Instagram app opens.
I set up all my lines to not be redundant, meaning each line is for 1 unique part of the day and week. I have 15 lines total covering almost every minute of the whole week.
My problem is this: a few minutes after I saved my config, some clicks were registered on all my bitly links, whereas only one was supposed to show. Now - 2-3 hours later, all links still collect clicks, making me think all messages are triggered despite the targeting. What is curious is that each of them is collecting the same amount of clicks. I don't know if the instagram app was also shown because the beacon is installed at a customer site remote from me.
Do you think it could be a bitly click count error or that really 4 messages (+ potentially the Instagram open in app message) are broadcasted by Eddystone-UID?
If you are getting clicks from "Mountainview California" It's Google crawler.
The way these notifications work is before displaying them on your phone, the device connects to a Google resolver to find URL, website name and description and an icon. This resolver crawls your website and caches the details (including the icon image).
This is registered as a hit/click on bitly, and that is what you see :)
And unfortunately it is not possible to get stats for app intents.
I think the title says it all. We have a site that uses a URL parts to specify locale, category, product, and product variation. For example:
/[country-code]/[category-slug]/[product-slug]/[variation-id]
As we support about 10 different locales, and some products have up to 30 variations, if we change a category, we can sometimes be trying to purge up to 1500 urls.
Is it possible using the Akamai CCU REST API to add a wildcard value, say for the country code, or variation id?
/*/[category-slug]/[product-slug]/*
I have seen some mentions of wildcards around but I'm not sure if they're supported by the API
This should be possible. When you go to CCU, click on "Refresh by Directory & File Extension". Hope this helps.
You can do a purge by CPCode.
I've just written a getting started guide for the CCU API:
https://community.akamai.com/community/developer/blog/2015/08/19/getting-started-with-the-v2-open-ccu-api?sr=stream
The only difference for your case is that you'll want to allow purge by CPCode, and set up a CPCode for the file areas you want to purge at once.
Helpful api instructions from the great mailgun api instructions say this:
GET /[domain]/bounces
Fetches the list of unsubscribes.
when I give it:
https://api:key-[my api key here] #api.mailgun.net/v2/[my domain here]/bounces
This works great but it only pulls down 100 as below
Parameter Description
limit Maximum number of records to return. (100 by default)
skip Number of records to skip. (0 by default)
sadly here is where the instructions dry up and as I am a newby to this, I haven't been here before, I can't figure out the url to add a limit of say 300 or even skip 100 so I can get the next batch.
can anyone tell me what this might look like in an HTTP statement as above
Thanks
The parameters can be sent using a POST request using multipart form data. I know this is not documented on that page, but that's what the curl example does, so it must work.
I have a problem with Facebook graph API. First time when I try to get home feed with URL https://graph.facebook.com/XXXXXXX/home/??access_token=accesstoken&until=1354639369&limit=40 all is good, I have a data. But when I diving deeper into the feed with changing "until" value (loading older messages) at some moment Facebook returned for me empty result:
{
"data": [
]
}
I can not find the reason of this problem. May be it is Facebook restrict?
Facebook (as stated in the other answer) indeed returns for maximum a months worth of data. If your until timestamp is >30 days in the past it will return an empty result. A solution would be to use batch requesting and get 30 days at a time.
You can read more about batch requesting in the Facebook Graph API documentation here: https://developers.facebook.com/docs/graph-api/making-multiple-requests
facebook provide data for last 15 post or a month which one is maximum.