Ads are served to users directly though their browsers. Depending on user interaction with the ad in a browser, different events may be appended to a log file (ads_out.txt). Log entries are in the following format:
userId = a 10 digit randomly assigned int value - this value should be consistent throughout the ad flow.
timestamp = GMT server time
The valid flow of an Ad is
1) A user requests an Ad and the Ad is displayed in the browser
2) User can either click on the Ad, or close the Ad
3) If a user clicks on the displayed Ad, they are redirected to a landing page with more details on the Ad
4) User can either click on links within the landing page or close the landing page
Events in Log file:
When an Ad is rendered to a user, event = 1
When a user clicks on a rendered Ad, event = 2
When a user clicks on an a link from an Ad landing page, event = 3
When a userId is provided that is not in proper format, event = 4
When an campaign is requested that is invalid, event = 5
Valid (supported) campaign values:
You can assume that event type 4 and 5 only happen when an ad is requested. The ad shouldn't display due to an error, so users won't be able to interact with the ad and no further events would be triggered.
Assume ads_out.txt is served on an external server.
To interact with the ads service, the following url can be used (this url doesn't actually exist):
I wanted to write a code to validate the logging of events in the text file work as intended.
Re: Help needed
A noble intent indeed, and I wish you all success.
Originally Posted by ddkm