Skip to Content

If you are doing Web development using SAP WebDynpro in Netweaver – you might find the fact that you cannot use Javascript in the UI a little bit annoying… so what do you do if you would like to use e.g. Google Analytics to monitor the usage of your WebDynpro application…? in order to do this you need to add a small Javascripts snippet to your webpages, and this is not possible in WebDynpro… or…. (btw: the same Javascript idea applies to other kinds of third party app’s.. not only Google apps)

Well.. I ran into a couple of links – and it gave me a good idea, that might help you embed Google Analytics.

  1. First of all your development platform need to support SAP Flash Islands (min. SAP NetWeaver 7.0 EhP1)
  2. Then you need to goto Google Analytics Tracking for Adobe Flash – in order to get the analytics.swc file
  3. Create a Google Analytics account in order to get an account-id for tracking
  4. Create a new SAP Flash Island application (click hereto see an SAP Flash Island template)- and add the analytics.swc to the Flex build path/Library path – the Island should not display much… maybe just a company logo etc.
  5. The new SAP Flash Island application should take an url as an input parameter and pass this url to Google Analytics using the Google Analytics Tracking tool for Flash/Flex (see example) using the command: ”
    tracker.trackPageview( the input url parameter );"
  6. Place the new SAP Flash Island application on each of the WebDynpro pages you want to track (the visual size of the Island could but small or covered by a company log – you just need it somewhere on the page) – and pass the actual url of the WebDynpro Application parameter to the Island. You actually just use SAP Flash Island to call Google Analytics, so from a display point of view the output of the Island is not that interesting in this example
  7. And you will be able to start collecting the WebDynpro Usage in Google Analytics
  8. Remember to check the terms of service

Happy programming…

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply