Here-api: REST geolocation api request change - rest

Trying the Here geolocation api with wlan data, originally the json request body was an array of {mac, powrx} objects. Mac being the mac address of the WiFi AP, powrx being the RSSI received for the beacon frame.
Recently, I've noticed the powrx parameter is no more mentioned in the documentation (although accepted by the api).
Is the "powrx" parameter officially deprecated? Does it mean that the geolocation algorithm doesn't use this information (anymore) ?

I assume you are referring to "Positioning API" in HERE REST APIs (https://developer.here.com/develop/rest-apis)
I checked the documentation in:
https://developer.here.com/documentation/positioning/topics_api/definition-wlan-locate.html
and it still mentions powrx.
There are no plans to deprecate this or other Positioning API parameters. If any parameter should for some reason be deprecated, there will be a prior notice in the documentation (see for example parameter 'frequency' in https://developer.here.com/documentation/positioning/topics_api/definition-cell-cdma-nmr.html).

Related

Converting Google Universal Analytics events to GA4

We parse our streaming server logs and post as events using the Measurement Protocol in Google Universal Analytics. I having a hard time finding how or if this could work in GA4. Here is an example post we POST using curl from a PHP script for someone listening to one of our HD channels:
v=1&tid=UA-123456789-1&cid=a76-b177-b238-b39d-634225a16b6e&ds=web&ua=AppleCoreMedia%2F1.0.0.19G71%20%28iPad;%20U;%20CPU%20OS%2015_6%20like%20Mac%20OS%20X;%20&ul=en-us&uip=1.2.3.4&cs=event&cn=station&cm=stream&ck=WXYZ%20HD3%20The%20Channel&t=event&ec=Stream&ea=Listen&el=WXYZ%20HD3%20The%20Channel&ev=10&cg1=Hour10&cg2=channel&cg3=Midday%20Weekdays%209am-1pm
We can then view these Events under Behaviors in Universal Analytics in our Event Category of Stream. I wrote this script using the Measurement Protocol parameter reference that clearly now shows a link to the Measurement Protocol in GA4 at the top of the page, but there is no similar parameter reference guide. As you can see, we've posted all mainly to categories, actions and labels even with custom groups.
Here is another for someone listening to a show that POSTS to campaign source/media events:
v=1&tid=UA-123456789-1&cid=a97-b76-b210-b2d-634225a16b6e&ds=web&ua=Mozilla%2F5.0%20%28Windows%20NT%2010.0;%20Win64;%20x64%29%20AppleWebKit%2F537.36%20%28KH&ul=en-us&uip=1.2.3.4&cs=event&cn=station&cm=stream&ck=The%20Show&t=event&ec=Stream&ea=Listen&el=The%20Show&ev=10&cg1=Hour1&cg2=podcast&cg3=Midday%20Weekdays%209am-1pm
Could someone be so kind to point me in the right direction if this is possible to convert to GA4 events?
Here is how you can translate an event in Universal Analytics to GA4:
Universal Analytics
Google Analytics 4
action (ea)
Maps to event_name
event_category (ec)
Maps to an event_category parameter with a parameter value
event_label (el)
Maps to an event_label parameter with a parameter value
event_value (ev)
Maps to an event_value parameter with a parameter value
Using your example, this is what the GA4 event would look like
gtag('event', 'Listen', { 'event_category': 'Stream', 'event_label': 'The Show', 'event_value': '10' });
For more information, refer to this Google help center article.

GA4 Conversion tracking using Measurement Protocol

[Edited. Added code sample and more explanations]
Is anybody familiar with the GA4 Measurement Protocol?
We are sending events from our backend servers to the server-side GTM container using the GA4 Measurement Protocol. Everything works fine except for conversion tracking. The events marked as conversion are not counted as conversions if we send those via MP (except for the default "purchase" event, it works perfectly). The same event with the same parameters counts as a conversion if we send it from the browser (client-side GTM). As I couldn't find anything about this issue online, the only thing left was to debug parameter by parameter using the server-side GTM preview mode. Here I discovered, that if I send events from the browser, the requests for events I mark as conversions in GA have "&_c=1" in their query string.
That means, as far as I understand it, that in order to get conversion events via MP, the event request needs to have "_c" query string parameter. I tried adding "_c" as an event param, but that didn't work. Is there a designated JSON parameter to mark the event as a conversion?
------------MORE INFO--------------
Here is an example of an event "Experts". This event gets sent from both the client-side and the server. As you can see in the screenshot, this event is marked as a conversion.
As you can see on the second screenshot, the actual events (137) are much more than the conversions detected (48). The difference are exactly the ones sent from the server-side.
Here is the request body of the server call:
{
"client_id":"Z9TLWnyVC2UK4UssPIVk8J+2n5BZhgWLtWSlFYYSwlg=.1642076344",
"user_id":"119412",
"events": [{
"name": "Experts",
"params": {
"tenweb_action": "[Test action]",
"tenweb_info": "[Some more info]",
"debug_mode":1,
"page_location": "https://10web.io/[some-test-page]"
}
}]
}
#Jan, #DaImTo, and everyone else that might have this issue in the future.
I think I've found a solution. Although it's unofficial and might break at any moment, it's the best one I've found so far. Here is what I ended up doing. While debugging via GTM preview mode I noticed, that in Event Data tab of conversion events there is an object "x-ga-system_properties", that, among other system variables, contains c:"1" . So I tried adding
"x-ga-system_properties":{"c":"1"}
to the event parameters JSON that we send to the Measurement Protocol endpoint of our server-side GTM.
IT WORKED. The events sent that way were registered as conversions by GA4.
Would be great to hear your thoughts on this. Do you think it's a stable solution? Do you think there will be official documentation on this from Google?

Provide array of URNs to LinkedIn REST API?

I am using the LinkedIn Marketing Development Platform where I am trying to provide a list of company URNs to to the Ad Analytics API. However, when I try to provide a list of company URNs, it fails with status 400.
Analytics Finder endpoint docs
My request:
GET https://api.linkedin.com/v2/adAnalyticsV2?q=analytics&pivot=CAMPAIGN&dateRange.start.day=1&dateRange.start.month=1&dateRange.start.year=2017&timeGranularity=ALL&companies=urn:li:organization:1234,urn:li:organization:5678
Response:
{"message":"Array parameter 'companies' value 'urn:li:organization:1234,urn:li:organization:5678' is invalid. Reason: Deserializing output 'urn:li:organization:1234,urn:li:organization:5678' failed","status":400}
I have also tried URL encoding the URL, and providing the list via the parameter companies[0] as is done in other examples in the docs.
What is the correct way to input arrays to the LinkedIn API?
Edit: Changed accounts to companies
So the Protocol Version actually gave me some useful insight. There are a couple of ways of providing arrays in parameters.
From the docs:
For Restli V1.0 (used by default)
GET GET https://api.linkedin.com/people?ids=1&ids=2&ids=3
For Restli V2.0, which you can use by setting the following header: X-RestLi-Protocol-Version: 2.0.0
Pass parameters in List format.
GET https://api.linkedin.com/v2/people?ids=List(1,2,3,4)
However, I have not managed to get the Analytics Finder API to work with Restli V2.0.
You'll need to provide the list of URL encoded organization URNs to the accounts param. Using your request as an example:
&accounts=List(urn%3Ali%3Aorganization%3A1234,urn%3Ali%3Aorganization%3A5678)

Got error on invoking the IBM Softlayer "getCpuMetricImage" rest API

I have an active IBM Softlayer account. I am getting the error as
{"error":"One of types passed is not in the proper container.",
"code":"SoftLayer_Exception_Metric_Tracking_Object_InvalidDataType"}
when trying to fetch the cpu metric image using the below rest API with valid Virtual_Guest_Id and Snapshot_Range":
"api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/<Virtual_Guest_Id>/getCpuMetricImage/<Snapshot_Range>"
But I am getting the proper response while fetching the memory metric image using the similar rest API listed below:
"api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/<Virtual_Guest_Id>/getMemoryMetricImage/<Snapshot_Range>"
First of all your REST request is wrong it should something like this:
POST https://$USERNAME:$APIKEY#api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/$VSIID/getCpuMetricImage
PAYLOAD:
{
"parameters": ["day","9/2/2017"]
}
Second the method is not working currently I am going to report it, but I do not have idea when they are going to fix it.
Another thing to point out is that the Softlayer's control portal do not use that method to display the graph, so is likely that the image returned by the method and the graph in the portal are going to be different. If you want the same inforamtion I recomend you to use the same method see this forum for more information:
SoftLayer API CPU usage mismatch
The method in the forum above will return you the data of the graph and then you are going to need to represent that information in a graph using your own code.
Regards

Getting Logos from Sites with SiteInfo

We are attempting to get site logos from the Yodlee API. From the SiteInfo data model (using the SOAP API), there are the following methods that appear to retrieve site logos
siteInfo.getDefaultSiteLogo()
siteInfo.getLocalizedSiteLogos()
getDefaultFavIcon()
The issue is that these methods for the sites we are using (all sites with the AU geography) are returning null.
I am pretty sure this is possible to do, since Yodlee's own fastlink does show logos for sites as you are adding them.
Here are the method call signatures
I am using the soap api through java (using axis 1.4, just like in the sample code) and the API signatures are as follows
SiteAccountManagementService has the method getAllSiteAccounts which has the following signature
com.yodlee.soap.collections.core.accountmanagement.ArrayOfSiteAccountInfo getAllSiteAccounts(com.yodlee.soap.common.UserContext userContext).
Then there is also getCctx, which has the following signature
public com.yodlee.soap.common.CobrandContext getCctx()
None of these methods have a request specifier parameter of any sought
I don't think icons will be returned by default. I believe you need to specify this in your request specifier to get icons/image.
getAllSiteAccounts API is to get the details for the Accounts aggregated by a consumer,
while the information you are looking for(the Logos) are site related not consumer related.
You should use getSiteInfo(under SiteTraversal) to get this specific detail and remember to pass value of siteFilter.reqSpecifier as 128.