Splitting organic and paid impressions in facebook api using R - r

I am using the Rfacebook package to retreive total impressions a facebookpost had. This works fine, however, this method does not split paid and organic impressions. I use the following code:
getInsights(object_id="post_id", token= token, metric='post_impressions')
Does anyone know how I can differentiate between organic and paid impressions/reach?

See the Facebook Insights API section on Page Post Impressions.
You should be able to pass values for metric as
'post_impressions_paid'
'post_impressions_fan_paid'
'post_impressions_organic'
'post_impressions_viral'
'post_impressions_nonviral'
etc...
to retrieve the various measures you need.
metric can also be a character vector which will allow you to retrieve many at once.

Related

Can I get reviews or stars for hotels or restaurants in HERE Geocoding & Search API?

I can't seem to find anything in the documentation (link), but the previous version of the Places API (link) said:
Certain types of categories, such as restaurants or hotels, are ranked via a "recommendations-style" algorithm where measures of popularity or quality, such as number of stars or reviews, are taken into account.
Does that mean that I would be able to retrieve info on number of starts for a hotel or ratings for restaurants?
Rating is Rich content. Rich content is not covered within the base or extended content and is generally provided by third-party data
suppliers.
See more on references from Geocoding and Search API 7 Discover API here https://developer.here.com/documentation/geocoding-search-api/dev_guide/topics/endpoint-discover-brief.html

LinkedIn Marketing API Creative Names/Text

I am trying to use the adAnalyticsV2 with the statistics finder method to pull reports for my campaigns segmented by campaign + campaign group + creative.
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#statistics-finder
It works fine for campaigns and campaign groups, I manage to find them in pivotValues and get their name. However for the creative name/title/subject/whatever, this is a different story.
Result from a creative pivot (sponsored video)
I don't see how I can retrieve the same title/name/subject that I can see via the web interface.
Web Interface adsets details
I tried many combinations with the projection/fields fields but without success so far :(.
Thanks,
You may need to project contents in the ugc API. like below:
variables(data((,directSponsoredContent, durationMicro, userGeneratedContentPost~(*)))))))

Pushing specific visitor ID into GA as personal identifier (Pardot)

I am trying to get to a point where I can identify visitors who are generating website Goals. And identifying them via their Pardot ID-s in GA.
Do you think that's possible?
On the site every visitor gets a Pardot cookie and in that there is a readable Visitor ID which via an API query can be turned into a Pardot ID.
But how can this piece of information get stitched to the rest of the GA parameters? How to push this into GA as a custom data point so I can create a report on who are the Pardot IDs that completed a certain goal this week?
Is there any guidance you can give?
Assuming, that Pardot ID itself is not a Personally Identifiable Information (PII) in terms of Google Analytics, there are several ways to accomplish this.
You could provide this data as User ID, which helps Google Analyitcs to identify users across several browsers and devices. However, this dimension is not exposed on the reporting GUI or the reporting API. (Available dimensions and metrics can be browsed here.)
Instead, or in parallel, you could store this information in a custom dimension, which, can be used in standard or custom reports, or via the reporting API as well. There a couple of things to consider. According to the Measurement Protocoll reference, the maximum length of this field is 150 bytes. You should also decide, if this dimension is most useful for your needs and possibilities on hit, session or user level, about which you can read here.

Use "default channel grouping" as a dimension in Google Analytics API

I would like to use the Google Analytics API to get the data displayed on the Acquisition Overview webpage. Especially, I need to get the sessions (formerly called visits) break by Default channel grouping : Direct, Organic Search, Referral, Social, Paid Search, Email, Display and (Other).
As explained here, these groups are based on regex. Therefore, it might be possible to recode these rules, but I would prefer to use these groups as a dimension.
I googled it and most of the answers are referring to Multi-Channel Funnels (MCF), but according to the MCF dimensions & metrics reference, it's more about conversion.
Does anyone know how to use the Google Analytics API (or GA MCF API) to get such data ?
Thanks a lot !
Acutaly I think you should be looking at the Core Reporting Api and dimensions and metrics
The thing that's going to be a little tricky is that first column. That column is Traffic Type and not something you can export directly. It is calculated based upon Source / medium.
Direct = Source not equal (direct) and Medium not equal to organic referral and cpc
Campaign = Source not equal to (direct) and Medium not equal to organic referral and cpc
organic = Medium is equal to organic
paid = medium is equal to cpc
I cant remember what social was I will have to look into that.
Here is the link where you can find the GA definitions for Default Channel Groupings:
https://support.google.com/analytics/answer/3297892?hl=en&ref_topic=3125765
When you go to this link, just click on the edit icon for the channel whose definition you want to see.
For example, for Social, the definition is:
Social Source Referral exactly matches Yes
OR
Medium matches regex ^(social|social-network|social-media|sm|social network|social media)$
Hope this helps.

Using GAPI ( Google Analytics API ), how can I find unique visitors?

How can I find unique visitors using gapi?
At Google Analytics, I used custom report and added 'Unique Visitors' as Metric and 'Page' as dimension and I am able to see the report. After applying filter, I can see unique visitor of each page and also Unique Visitors overall. But, I am not able to do so using gapi.
Sorry, I wish I had a better answer for you. It looks like Google saves themselves the computation by limiting which results the API can return. However, the article states that for many reason, visits will give you more meaningful data.

Resources