snowplow / snowplow-cpp-tracker

Snowplow event tracker for C++. Add analytics to your C++ applications, games and servers
http://snowplowanalytics.com
Apache License 2.0
9 stars 6 forks source link

Allow custom User Agent strings (close #23) #31

Closed matus-tomlein closed 2 years ago

matus-tomlein commented 2 years ago

Adds a set_useragent() function to Subject to set a custom useragent by configuring the ua property in events.

matus-tomlein commented 2 years ago

@AlexBenny You're right, but it would require a bit of a bigger change in the code to propagate the Subject configuration for useragent and read it in the HttpClient when creating the HTTP request. Currently neither the Emitter nor the HttpClient are aware of the subject properties (they are only given the payload). I think it's not worth the effort to change the header because it doesn't have an effect on the useragent anyway – the one in the "ua" property takes precedence.