Expand my Community achievements bar.

SOLVED

Which query parameters and URL components are required?

Avatar

Level 1

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:

  • Project ID
  • Value beginning with s
  • Timestamp
  • MId
  • McOrgId
  • Aamb
  • Prop variables

This results in my URL look like:

     https://myurl.net/b/ss/proj/1/JS-2.6.0/s45000000000000/?t=22%2F5%2F2019%2011%3A20%3A00%201%20-60&mid...

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

7 Replies

Avatar

Level 1

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.

Avatar

Correct answer by
Community Advisor

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

Avatar

Community Advisor

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?

Avatar

Level 1

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.

Avatar

Level 1

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.

Avatar

Community Advisor

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!)