Are fullPageUrl and averageSessionDuration no longer compatible in Reporting API? - google-analytics

Until December 12th 2022, I was able to combine fullPageUrl and averageSessionDuration in run report requests to the
Following endpoint
https://analyticsdata.googleapis.com/v1beta/properties/xxxxxxxxxx:runReport
If you go dimensions and metrics exporer and select the dimension "fullPageUrl", you can no longer select "averageSessionDuration". They are incompatible now.
My request body in JSON looks like this:
{"dimensions":[{"name":"date"},{"name":"fullPageUrl"},
{"name":"pageTitle"},],"metrics":[{"name":"averageSessionDuration"},{"name":"userEngagementDuration"},],"dateRanges":[{"startDate":"7daysAgo","endDate":"today"}]}
I get this error message as a reply:
{
"error": {
"code": 400,
"message": "Please remove averageSessionDuration to make the request compatible. The request's dimensions & metrics are incompatible. To learn more, see https://ga-dev-tools.web.app/ga4/dimensions-metrics-explorer/",
"status": "INVALID_ARGUMENT"
}
}
I couldnt find anything in the documentation or in the changelogs.

The Google analytics data api is in beta it is not completed which means that they are still tuning it.
Your issue is that "fullPageUrl" and "averageSessionDuration" are not longer compatible you cant use them together in a report.
That being said I cant find any mention of it in the change log so I am going to contact the team and see what they have to say.

Related

Issues while expanding URNs in versioned creatives response

We are migrating our APIs from unversioned to versioned, and having an issue while trying to get assets data from creatives endpoint.The response has reference to a post, but we are unable to use the expand URNs concept and get the inner media details of the Post URN. Is there a different approach we need to follow here?
I've read through all the migration documents and the response decoration document is also pointing to v2 endpoint and projection parameters, instead of using rest endpoint and fields parameter. Document reference.
Previous Request
GET -
https://api.linkedin.com/v2/adCreativesV2?ids[0]=181794673&projection=(results(*(variables(data(com.linkedin.ads.SponsoredVideoCreativeVariables(userGeneratedContentPost~(specificContent(com.linkedin.ugc.ShareContent(shareCommentary,media(*(media~:playableStreams(),title)))))))))))
This request gets us the media details of the creatives without making multiple calls.
Current Request
GET - https://api.linkedin.com/rest/creatives?ids=List(urn%3Ali%3AsponsoredCreative%3A181794673)&fields=(results(*(content(reference~($URN)))))
I am looking at the response I got from https://api.linkedin.com/rest/creatives?ids=List(urn%3Ali%3AsponsoredCreative%3A181794673) and trying to create the fields request. But no luck yet and getting the below error.
{
"status": 400,
"code": "ILLEGAL_ARGUMENT",
"message": "Invalid projection parameter: (results(*(content(reference~($URN)))))"
}
But when tried with projection in place of fields I got a response
{
"results": {
"urn:li:sponsoredCreative:181794673": {
"content": {
"reference": "urn:li:ugcPost:6905584391779950593",
"reference!": {
"message": "Not enough permissions to access deco: ugcPosts.BATCH_GET.20230101",
"status": 403
}
}
}
}
}
Can someone help me getting the data similar to how we got it before, without making external calls? Otherwise I think I have to be making calls to Creatives -> Posts -> Video, Image, Share etc endpoints

Call to sdm.devices.commands.ThermostatTemperatureSetpoint.SetCool fails with error 500 Internal Error

I'm new to the Google / Nest SDM and saw this questions has been asked previously but not answered. I'm hoping with a little more information, I might be able to get some direction on where to look. I have been working on a connector app and I have most functionality working, I can retrieve the structures and devices and I can even change the modes from OFF to HEAT. to COOL and the thermostat reflects the changes. However, when I try to change the temperature, whether it's in heat or cool mode, I receive:
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
I'm using:
{
"command" : "sdm.devices.commands.ThermostatTemperatureSetpoint.SetCool",
"params" : {
"coolCelsius" : "22.0"
}
}
I've tried Postman, RESTer and I don't receive much information other than the error 500. Anyone recommend anything else I can check? Weird how I can turn the thermostat on/off/change mode or put into ECO, but I can't adjust the temperature.

Search for campaign groups using LinkedIn Ads API always return 400 Bad Request

Using LinkedIn Ads API document on this page -> https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-campaign-groups#search-for-campaign-groups
If I search for campaign groups with completed status, it will always return 400 Bad Request with following message
{
"message": "{field=ID, order=ASCENDING} does not provide a valid value for sort.field for CampaignGroupSort. The acceptable values for field: ID,ACCOUNT,NAME",
"status": 400
}
As you can see from the message itself, I've already used ID as sort's field. Following is a request url that causing error
https://api.linkedin.com/v2/adCampaignGroupsV2?q=search&sort.field=ID&sort.order=ASCENDING&search.status.values[0]=COMPLETED
However, this issue doesn't happened if I just changed search.status.values from COMPLETED to something else e.g. ACTIVE. Like the following request
https://api.linkedin.com/v2/adCampaignGroupsV2?q=search&sort.field=ID&sort.order=ASCENDING&search.status.values[0]=ACTIVE
Above request returns with http status 200 with success result.
I've tried many combinations with no luck. Anyone can help please?
https://api.linkedin.com/v2/adCampaignGroupsV2?q=search&sort.field=ID&sort.order=ASCENDING&search.status.values[0]=COMPLETD
There is a typo in COMPLETED for your search.status.values[0].

How can I fix a 501 error from the clockify API?

I'm getting a 501 response from the clockify API when trying to create a Time Entry using CreateTimeEntryRequest
I've verified I can query the API and get data from it, so I'm using the correct X-Api-Key, I've resolved a few issues with bad datetime formats, but I'm still getting the error.
URL I'm posting to:
https://api.clockify.me/api/workspaces/REMOVED/timeEntries/
My POST request header looks like this:
{"x-api-key": REMOVED, "Content-Type": "application/json"}
The body of the request is (For example):
{"start": "2019-01-28T14:53:04Z", "billable": false, "description": "Test Time Entry", "projectID": null, "taskID": null, "end": "2019-01-28T15:53:04Z", "tagIds": []}
I'm getting:
{"message": "Entity not created.", "code": 501}
And the time entry is not being created.
I expect some kind of success message
It has something to do with the "End" variable. If you remove it, it'll work. This of course means the timer will be running (also you will get a 400 error if you already have a timer running), so if you want to stop it, you'll have to immediately call PUT /workspaces/{workspaceId}/timeEntries/endStarted or if you want the stop time to be at some point in the past, you'll have to update the timer with PUT /workspaces/{workspaceId}/timeEntries/{id}. However the update doesn't seem to work either (same issue). My guess is they made a change to the endpoint (perhaps renamed the "end" variable), because I'm about 75% sure I used this API within the last month or so and it worked.
Hopefully someone from Clockify will see this and give an update. I had a similar issue happen with the "me" field in the GetSummaryReportRequest object. It stopped working and removing the field fixed it.

Mobile data reported in GA Measurement Protocol appear in realtime but not in daily summary

I've been attempting to log activity on a mobile-like device using the Google Analytics Measurement Protocol. All of these attempts have validated using the validation URL, and I can see activity when I look at the real-time reports on the Analytics website. But when I look at the Home or Overview reports for the day - no activity is shown.
The view is set for "All Mobile App Data".
The POST body looks something like this:
v=1&tid=UA-000000000-1&ds=app&qt=1601&uid=uid-zzzzz&t=screenview&cd=Foo&an=Foo%20App%20Name&aid=com.example.foo&aiid=com.example.foo&av=0.0.1&ua=Mozilla%2F5.0%20(Linux%3B%20Android%207.0%3B%20SM-G930V%20Build%2FNRD90M)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F59.0.3071.125%20Mobile%20Safari%2F537.36
The ua field is just a pre-defined string. I found that if I omitted it, the Real Time monitoring listed the hits as desktop hits, although I was in a Mobile report and the ds field was "app".
Am I missing a field that is required? Is there some reason why it is showing up in the real-time report, but not in a daily report? Is there some other way to diagnose why the data is vanishing, or confirm the data is actually being captured?
When i check the debug endpoint the hit is valid
Request:
https://www.google-analytics.com/debug/collect?v=1&tid=UA-XXX-1&ds=app&qt=1601&uid=uid-zzzzz&t=screenview&cd=Foo&an=Foo%20App%20Name&aid=com.example.foo&aiid=com.example.foo&av=0.0.1&ua=Mozilla%2F5.0%20(Linux%3B%20Android%207.0%3B%20SM-G930V%20Build%2FNRD90M)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F59.0.3071.125%20Mobile%20Safari%2F537.36
Response
{
"hitParsingResult": [ {
"valid": true,
"parserMessage": [ ],
"hit": "/debug/collect?v=1\u0026tid=UA-53766825-1\u0026ds=app\u0026qt=1601\u0026uid=uid-zzzzz\u0026t=screenview\u0026cd=Foo\u0026an=Foo%20App%20Name\u0026aid=com.example.foo\u0026aiid=com.example.foo\u0026av=0.0.1\u0026ua=Mozilla%2F5.0%20(Linux%3B%20Android%207.0%3B%20SM-G930V%20Build%2FNRD90M)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F59.0.3071.125%20Mobile%20Safari%2F537.36"
} ],
"parserMessage": [ {
"messageType": "INFO",
"description": "Found 1 hit in the request."
} ]
}
I cannot use one of the mobile libraries from Firebase - this is not one of the platforms they support. I do not wish to pretend this is a web page - there is no associated hostname or path. I do not wish to use Events since I can't do event Behavior Flow, which is one of the things I'm interested in seeing.
I'm aware that it can sometimes take "a day or so" for results to first appear. The site was setup over five days ago at this point, and has received data during that time.
Good thought about the anti-spam setting, however the setting appears to be correct:
I've also tried using GET instead of POST - no change, it still shows the hit in real-time, but then it vanishes.
However, I know that it can record hits permanently. There were two hits from a spammer in Russia that have shown up in the daily report (I wasn't there to see it show up in real-time). I don't know what they did, but would love to find out since it might help figure out how I can add a record.
In the real-time reports, it correctly points out the data center all the hits are coming from. Perhaps that is filtering it out somewhere out of my control?
Try adding Cid I know it says this is an optional parameter but for mobile accounts I belive it may be required.
Client ID
Optional.
This field is required if User ID (uid) is not specified in the request. This anonymously identifies a particular user, device, or browser instance. For the web, this is generally stored as a first-party cookie with a two-year expiration. For mobile apps, this is randomly generated for each particular instance of an application install. The value of this field should be a random UUID (version 4) as described in http://www.ietf.org/rfc/rfc4122.txt.
Example value: 35009a79-1a05-49d7-b876-2b884d0f825b
Although this says it needs to be a UUIDv4, it does work with other UUIDs (I've tested it with a v5, which is a hash against the value used for the uid parameter).

Resources