Forum Cross Platform with Xamarin



Just wondering if anybody has plugged Xamarin into Webtrends mobile analytics SDK. I am developing an iOS and Android pair of apps that need to log some information to webtrends. Any advice or guidance would be most helpful.



  • AdamPAdamP AUUniversity ✭✭✭✭✭

    @JonathanDibble - looks like I might be doing it in a few weeks time. Doesn't look like there is a Xamarin sdk of any kind. How did you go?

  • JonathanDibbleJonathanDibble GBMember ✭✭

    @AdamP Leaving this part of the development until the end of the project. SDKs exist for both iOS and Android, need to write some Xamarin bindings to include them in the project. In the meantime I'm hoping the business switch to Google Analytics. Let me know how you get on, if you start before me.

  • AdamPAdamP AUUniversity ✭✭✭✭✭
    edited August 2016

    @JonathanDibble - I did finally implement WebTrends. I didn't use their SDK's because they still don't have any Xamarin ones and binding seemed more effort than talking straight to their API, which is what I did.

    Very simple API, POST a URL Encoded String to their API and they manually setup and map variable names for your account, then build reports off that. The SDK just does the same thing with predefined variable names. I used some predefined ones too but got them to add more because I wanted more information going across.

  • JonathanDibbleJonathanDibble GBMember ✭✭

    @AdamP That's great news. I have been trying to bind the webtrends SDKs, but have not managed to achieve anything positive. Your approach sounds like the way forward. Could you point me in the direction of any API documentation from webtrends?

  • AdamPAdamP AUUniversity ✭✭✭✭✭

    @JonathanDibble - It is the WebTrends Data Collection API that you want.

    The documentation is a little sparse but the quick takeaways are, is WebTrends will give you an API key.

    First you need to get a visitor ID - Doc here:
    You will need to put in your API key into the URL. The VisitorId is stored and kept locally on the mobile device to keep a track of the user across multiple API requests.

    Then to post something to webtrends you then do a POST to this URL, changing out the x's with your API key again.

    What you post will look something like the below in the body.

    The list of parameters was given to me by the WebTrends rep. I imagine yours will be able to give them to you as well as they might setup custom ones for your account.

    It will return 200 if all went well. You can also switch on verbose mode (as shown in the docs) to get back more information.

    Further information on all the information I gave above is publicly available in the documentation link I gave. Any more details that you need such as more parameter types, the WebTrends rep can give you.

    The only additional thing you need to do with this approach is getting things like the battery level, OS, Model and other things you want or expect yourself to send them via the API, rather than the API doing similar stuff like this for you.

  • JonathanDibbleJonathanDibble GBMember ✭✭

    @AdamP That is a great amount of help. Thank you for your guidance, and congrats on having what maybe the first set of Xamarin apps to utilise webtrends. Cheers!

  • JonathanDibbleJonathanDibble GBMember ✭✭

    Hi @AdamP, With your initial guidance, my android & ios apps are now successfully logging away to webtrends. Once again, thanks for the help :smile:

Sign In or Register to comment.