I am trying to fetch as many LinkedIn updates as possible for a company--
Here is the link I am using -
https://api.linkedin.com/v1/companies/21837/updates?event-type=status-update&count=250
But it only returns 10 updates. There are many more updates but they don't show up in the response. All posts older than a month ago don't show up. Is there a limitation on how far back you can go?
Appreciate any help!
20 days seems to be the limit, according to the LinkedIn API documentation.
Note that the API returns the latest 50 updates only for event type
status-update. If you have updates of other types (such as jobs
posting, product-updates etc.) then it can fetch up to 250 updates or
updates in the last 20 days whichever comes first.
The wording there isn't totally clear, their API documentation isn't very good unfortunately.
Related
I'm working on a simple app to programmatically retrieve ads performance within Linkedin. I have general API experience but this is the first time i get my feet wet with the Linkedin API.
One example from Linkedin API documentation suggest something that would get me started:
GET https://api.linkedin.com/v2/adAnalyticsV2?q=analytics&dateRange.start.month=1&dateRange.start.day=1&dateRange.start.year=2016&timeGranularity=MONTHLY&pivot=CREATIVE&campaigns=urn:li:sponsoredCampaign:112466001
I am encountering two problems:
First this example implies that you already know the campaign ID. However I am unable to find a way to retrieve a list of campaign ID's for a given account.
Second, if I manually pull a campaign ID, I receive an error: "{"serviceErrorCode":2,"message":"Too many fields requested. Maximum possible fields to request: 20","status":400}". Pretty clear error.
A little research tells me that by adding the parameter "&fields=" I will be able to limit my query to less than 20 field (I really need only a dozen anyway) but I can't find and documentation regarding the names of the fields available.
Any help or pointer will be appreciated.
please refer the link below scroll down where you ill see the field names mentioned as metrics , these are the fields.
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting?tabs=http#analytics-finder
I am trying to get in touch with LinkedIn support for the past month now, unfortunately I had no luck getting to the dev team through the account management.
We are using a reporting tool to pull LinkedIn campaign data via their API. We would like to pull Campaign Names which doesn't seem to be possible at the moment referencing https://developer.linkedin.com/docs/ref/v2/ads/adcampaigns#get
However, is there any kind of way to retrieve the Campaign Names (ID is making it really hard for us to identify campaigns on the fly)? It seems like such a basic request, I find it hard to believe LinkedIn has no way of doing this.
Thanks in advance!!
A little further down that page you referenced is a section called "FINDER" with this:
https://api.linkedin.com/v2/adCampaignsV2?q=statuses&statuses=ACTIVE
Options are ACTIVE, PAUSED, ARCHIVED, COMPLETED, OR CANCELLED
You will get the "name":"MY_CAMPAIGN_NAME" field there. That's the only place I've found it so far.
I build application which pull sales data from Amazon and push it to Google Analytics.
I'm "hitting" transaction to Analytics and it's all works fine, the problem is that in Amazon the sales data updated after 48 hours (maximum) so I need to pull the report two days later.
Does anyone know if there's a way to send the date of the transaction? Can't find it in the Measurement Protocol API.
Thank you all, Peace and love :)
Not really. You have the queue time parameter (offset between current time and time the data was tracked), but as it says in the documentation:
Values greater than four hours may lead to hits not being processed.
"May" indicates that this is not a completely fixed limit but I'm pretty sure that 48 hours are not covered (Philipp Walton, a Google engineer who frequents SO once mentioned that the queue time limit is somehow related to timezones and rollover between days, so I'd guess that two days are way to long).
Apart from that there is as of yet no way to set a date for a hit.
You can try posting a Custom Dimension for each event you send, where the dimension is formatted to the date-time:-
e.g.
&t=event&cd1=20170423081321&cm1=24 etc
Only problem is: when you generate a GA custom report, the values are accumulated per day. If anyone knows how to get round that, would love to hear it!
I have two view/profiles linked to my google analytics account. I want to fetch the hourly data for the current day, ie
start date:today
end date: today
with a few filters and dimensions.
Now I am getting the response for one view that means it is possible in google analytics, however for the other view its showing all the values as 0- this applies both to the gui and the api.
Can anyone suggest me how to enable it for the other view as well?
You cannot. Google Analytics needs some processing time. It might be that some data appears immediately, especially on small accounts, but it's not guaranteed and not a thing you can "enable" or count on.
Updated: Okay, that was a dumb answer. Still, there is a processing latency event in GA Premium. It is possible to get realtime data, but that's a different API with limited data (the core reporting API might return data, but no guarantees for that).
But I admit, since your problem is that you do not get data for the whole day yor have a different problem. But with a premium account you should be able to contact your account manager/technical support.
I would like to create a small sidebar on each page of my website that contains related/popular pages with perhaps the top five pages users visit after reading the current page.
I could track and record user movements across the site myself and build the list that way, but as my site already uses Google Analytics and I know the data is there I'd rather access that if all possible.
The trouble is that I don't have the faintest idea whether it is possible or not.
Remember that the Google Analytics Reporting API is not real-time it can take between 24 - 48 hours for the data to finish processing and be in the API for you to request.
The Realtime Google Analytics api is real time but the data is only about 5 minutes old and its very limited to the dimensions and metrics you can request.
Quota, with either of those APIs you are limited to 10,000 requests per day per profile / view. I have no idea how many pages there are on your site or how may users are on your site but this could quickly blow out this NON extendable quota.
Options: Except that its not realtime data and use the reporting api every night run a request against the api get everything for two days ago then show your users on your site data that's two days old. Store the data in the database then you are showing them data on in your DB and wont have an issue with the quota as you only requested it once.
But this isn't exactly what you want as its not showing a users activity over the site. TBH I am not sure you can exactly use Google Analytics to track a user as the data is user non specific.
If you don't want to get involved with learning the API and develop this from the ground up, check out EmbeddedAnalytics (disclaimer: I created the service). We could provide such a widget.
You may find This Article useful. It provides the necessary query to find the "next page visited" using the page of interest as a filter. Ultimately your query would look like this:
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3Aabc&start-date=30daysAgo&end-date=yesterday&metrics=ga%3Apageviews&dimensions=ga%3ApreviousPagePath%2Cga%3AnextPagePath&sort=-ga%3Apageviews&filters=ga%3ApreviousPagePath%3D%40pricing
The query above will give you the "Next Page" along with pageviews assuming the "previous" page contains the word "pricing".
We could easily build such report widget for you:
You would insert a javascript source code snippet into your page. The javascript would pass the page url to our server and we would return the next "most popular pages visited".
The pages could be "linkified" so that someone could click the link to go to that page.
We already have caching mechanism in place. So each pageview would not require a new query to google (making it quicker and also staying away from the API quota that was mentioned above). For pages that are hardly ever looked at (e.g. less than once a week), we could make "on-demand" calls to get the statistics.
In my experience with the API, the lag in the API is only a couple hours. It may be longer for larger sites.
Please let me know if you are interested in such widget and I can work with you.