I'm writing my own REST request to track usage of my Java application. I'm copying the query of another JavaScript project which I know for a fact works. I'm using:
This results in my URL look like:
Regardless of what I send a 200 response is returned. I'm taking most of the values as a direct copy from the JS counterpart except for Project ID, S value, timestamp and the prop variables. Is this all I require?
Solved! Go to Solution.
Views
Replies
Total Likes
I do not recommend to just copy a server call generated by DTM and try to adobt. there are a lot of information which might mess your reporting if not set properly.
I would try to use something like a simple "img tag" which are used to track eg. emails or similar (where you cant include full js). I mean, just use the structure of the corresponding sec and modify for your needs.
here are some resources:
- https://helpx.adobe.com/analytics/kb/sending-image-requests-emails.html
- https://marketing.adobe.com/resources/help/en_US/sc/implement/query_parameters.html
Views
Replies
Total Likes
Views
Replies
Total Likes
Thanks but I've found that PDF but regrettably it doesn't seem to give much information. Also it's for the Java library (which I've tried to use and the instantiation example doesn't work) whereas I need information on sending a REST request.
Views
Replies
Total Likes
I do not recommend to just copy a server call generated by DTM and try to adobt. there are a lot of information which might mess your reporting if not set properly.
I would try to use something like a simple "img tag" which are used to track eg. emails or similar (where you cant include full js). I mean, just use the structure of the corresponding sec and modify for your needs.
here are some resources:
- https://helpx.adobe.com/analytics/kb/sending-image-requests-emails.html
- https://marketing.adobe.com/resources/help/en_US/sc/implement/query_parameters.html
Views
Replies
Total Likes
found another link about "img tags":
Implementing Analytics using HTML image tags
maybe you can just modify the "src" to your needs and send it as a "REST request" to collect the data.
we have some pages where we have a hardcoded IMG tag, works as a simple counter for "impressions", nothing more. I would expect that you can do all this within Java and just add more information to the request.
remark: I would hive the Java library a try - why can't you use the library?
Views
Replies
Total Likes
Thanks for the information!
With regards to not using the Java library: I found the documentation to be incredibly scarce and was unable to get it working. The only document I could find was the one you linked previously. If you compare that to the JS documentation, I'm sure you'll agree that the Java documentation is severely lacking.
I knew a colleague used the JS implementation successfully and he showed me the request they made so I mimicked the request through Postman, changing my project to his and it logged. The problem is they track a lot of parameters and I would rather not include things I don't have to.
Views
Replies
Total Likes
Also, is it standard to have the Adobe Analytics server return a 200 response regardless of what you send to it? I can send it complete nonsense and get a 200. It would be useful if it returned a server error if I didn't supply a required parameter instead of having to wait an hour to see if it logs.
Views
Replies
Total Likes
ok, got it. will send you an example we use later on. meanwhile, those links might be helpful:
https://webanalyticsfordevelopers.com/2013/04/30/debugging-the-url/
http://digitaldatatactics.com/beaconParser/ (check option "show friendly names!)
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies