Google Analytics Integration with Mobile App to track user experience


I have a Mobile Application with Restful Services which runs on Android and iPhone. I want to track user experience on my app with google analytics. Can anyone provide me good tutorials or code samples on this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle SantosQuality AssuranceCommented:
Here is an example of code used for a WordPress portal.

Verify presence of 'live' script across all pages in portal:
<script type="text/javascript">
        dataLayer = [{'environment': 'Live'}];

Open in new window

Verify presence of Google tag manager script within the <head> tag of all pages in portal:
<meta name="generator" content="EXAMPLE WORDPRESS" />
<link rel='canonical' href='INSERTURL' />
<link rel='shortlink' href='INSERTURL' />
<!-- This is needed -->
<script type="text/javascript">
  dataLayer = [{'environment': 'Live'}];
<!-- Google Tag Manager -->
<noscript><iframe src="//"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager -->

Open in new window

Here is Google Tag Manager.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Owen DaleCommented:
Thanks Kyle Santos, useful information for me
mynetquestionsAuthor Commented:
This is helpful to make a call from the client side. I am looking for the example where we can make a call to google analytics API by using google analytics credentials in c# to insert the data.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Google Apps

From novice to tech pro — start learning today.