Analytics Measurement Protocol "Document location URL" parameter (dl) Question - google-analytics

I have a couple of questions about the "Document location URL" parameter (dl) of the Measurement Protocol (Universal Analytics) (see https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#dl):
If the &dp parameter is added to override the path + query portions of the document location, is there a way to retrieve the original complete URL path via an API call?
If the &dp parameter is used, would Google still store the original path and query string somewhere?
Thank you in advance for your help!
Clayton

Related

Google Analytics Campaign/Source/Medium Not Showing

I have a "short URL" MVC website that takes in an identifier and redirects the user to the end resource based on that identifier.
Prior to the redirect I create a web request to Google Analytics (GA) to track which identifiers are commonly used. I would also like to track some more information using campaign/source/medium options in GA but I'm having a tough time getting these to show in the reports - the link I'm using is below (utmac switched out for obvious reasons):
https://www.google-analytics.com/__utm.gif?utmdt=ShortUrl+Redirect&utmp=%2f3f20118&utmac=UA-9999999-99&utmcc=__utma%3d.1675621744.1591667140.64981.1591667140.64981.1591667140.64981.1%3b%2b&utm_source=TestSource&utm_medium=TestMedium&utm_campaign=TestCampaign
I see the hit but it shows with a medium of "(none)" and source of "(direct)" when I'm expecting to see "TestSource" / "TestMedium"... Is it that I'm constructing the URL wrong or a miss in GA setup?
I've also tried putting the utm_source/campaign/medium as part of the utmp address as query string values but no luck: https://www.google-analytics.com/__utm.gif?utmdt=ShortUrl+Redirect&utmr=0&utmp=/3f20118?utm_source=TestSource&utm_medium=TestMedium&utm_campaign=TestName&utmac=UA-9999999-99&utmcc=__utma%3d.29260146.1591743271.10202.1591743271.10202.1591743271.10202.1%3b%2b
You have to add utm parameters to the querystring of website URL.

Determine timezone based on location using Here APIs

I want to get get the timezone of a location (lat/long) using the here REST APIs. I know there is a Google timezone API to do this, but I couldn't see any timezone information in any "Reverse Geocoding" API responses for the here REST APIs.
For reverse geocoding you need to add additional parameter locationattributes=tz to the request. Example request:
https://reverse.geocoder.cit.api.here.com/6.2/reversegeocode.json
?prox=50.112,8.683,100
&mode=retrieveAddresses
&app_id=xxx
&app_code=yyy
&gen=9
&locationattributes=tz
You can find a full description of available input parameters by link: https://developer.here.com/rest-apis/documentation/geocoder/topics/resource-reverse-geocode.html

What will the RightSignature API send to my callback URL when a signer signs a document

When I send a one-off document to RightSignature via their API, I'm specifying a callback location in the XML document as specified in RightSignature's schema definition. I then get a signer-link value back from their API for the document. I display the HTML response from the signer-link URL in an iFrame on our website. When our user signs the document in this iFrame, which is rendering the responses from their website, I want their website to post to our callback location.
Can I do this with the RightSignature API and does it make sense?
So far, I'm only getting content in the iFrame that indicates that the signing was successful. The callback location does not seem to be getting called.
I got it solved just now. Basically, i was doing two things wrong first you have to go in RightSignature Account and set it there the CallBack url
Account > Settings > Advanced Settings
But the thing which RS is unable to mention to us that this url can not be of localhost, but it should be of https i mean like Live URL of your site like
https://stagingmysite.azurewebsites.net/User/CallBackFunction
And then in your CallBack just write these two lines and you will receive complete XML which would have the GUID and document status as well.
byte[] data = Request.BinaryRead(Request.TotalBytes);
string callBackXML = System.Text.Encoding.UTF8.GetString(data);
I found the answer with some help from the API team at RightSignature. I was using callback_location but what I really wanted is redirect_location. Their online documentation was difficult to follow and did not clearly point out the difference.
I got this working after a lot of trial and error.

What status code to use when certifying an upload?

I'm working on a direct-to-S3 upload service that operates in two parts described below. This service would not be used by browsers, but would be a RESTful API used by other software clients.
Make a request to an endpoint which certifies and validates the upload, returning an upload URL if all's well.
Make a PUT request to the URL returned from #1 to actually do the upload to S3.
How should the server structure the response for the first endpoint?
The first option I am considering would be to use GET and return a status code 302 with a Content-Location header containing the URL to upload to. However, the intent behind the redirect descriptions in the spec seems to be focussed on redirecting after a form submission.
The other option I'm considering is to use POST for the first endpoint and returning a Location header with the URL, as described here:
If a resource has been created on the origin server, the response
SHOULD be 201 (Created) and contain an entity which describes the
status of the request and refers to the new resource, and a Location
header. RFC 2616 #9.5
Please advise on what other people have used in such circumstances?
I think it mainly depends on whether your API itself will have a resource referencing the uploaded file or not. The only one with knowledge of the uploaded file is the S3 itself or your API has something referencing it?
If the first case where only S3 knows about it, then it's OK to use the GET if it acts merely as a generator for the upload parameters, including the URI.
If the second case, then it shouldn't be a GET, since you're changing something on your side. Yes, you should make a POST, but the Location header should be used to return the URI for the created resource that references the uploaded file. That resource may have the upload URI and it could act like a state-machine, tracking if the file is uploaded or not. To avoid the need for clients to GET that resource before being able to upload, you may return the upload URI in the Link header, with a rel reflecting that purpose.

Sample rest url to retrieve content from alfresco

I want to retrieve content of sample.html inside catalog folder in alfresco using restful.
From alfresco document i got the following rest url to retrieve content of a document. But i dont know exactly what is property, stor_type, store_id,id and attach.
GET /alfresco/service/api/node/content{property}/{store_type}/{store_id}/{id}?a={attach?}
It would be grateful if someone explains me the above rest url properties and provide me a example.
The CMIS Web Scripts Reference and the Repository RESTful API Reference give a little more information (but no examples).
property is the property of the node to follow in order to obtain the content - this will default to cm:content so can generally be omitted
store_type will normally be "workspace" for live application data - see this forum discussion on store types etc
store_id will be "SpacesStore" for normal files - see this forum discussion on other stores
id is the unique identifier for the node (within a given store), e.g. 986b162e-0867-4a7b-9f4f-0e3837cdc97b
attach - if true, force download of content as attachment (defaults to false) - I think this is to trigger "Save as..." in a browser rather than directly streaming the content?
Example GET URL (untested - and of course you'd need to use a valid host, port and id)
http://my.example.com:8080/alfresco/service/api/node/content/workspace/SpacesStore/986b162e-0867-4a7b-9f4f-0e3837cdc97b
Together, the store_type, store_id and id form a NodeRef which uniquely identifies a node, e.g.
workspace://SpacesStore/f1a5e908-80cb-4c6e-b919-cc80fe53b835
There are a couple of examples (though not of this exact API call) on Jeff Potts' tutorial on Curl and web scripts.
If you want to download a file by name and path (without already knowing the node ID) then you will need to use another API, as the one you are using requires you to know the node ID.
This page mentions a direct download URL that accepts a path and filename, e.g.
/alfresco/download/direct?path=/Company%20Home/My%20Home%20Space/myimage.jpg
Depending on access controls, you may need to add the login ticket parameter to this URL, e.g. &alf_ticket=1234567890, where 1234567890 is the security ticket provided by the login URL.
Note: although I refer to the CMIS Web Scripts Reference above, see also this posting and Jira ticket that state that CMIS web script URLs are deprecated, i.e. ( /alfresco/service/cmis and /alfresco/cmis)

Resources