Set up Google Analytics widgets for the first time

There are two Google Analytics widgets included in the dashboard from start - Web Analytics and E-commerce Analytics. In order to use these you need to save your Google Client ID and Client Secret in Litium Studio. Once this is done, when users logs into back office and want to setup the Google Analytics widgets, only step 9 to 11 are required.

Create your Google Client ID and Client Secret

To use the Google Analytics widgets you need to have a Google Analytics account connected to the web site. To be able to login you need to use a real domain for your site, http://mydev.local will not work. For easy testing you can assign the domain http://mydev.localtest.me to the bindings in IIS (the localtest.me domain is configured so everything.localtest.me will be pointed to 127.0.0.1/localhost).

1. To create a Google ID go to console.developers.google.com and login using the Google Analytics account. Click Create project...
google-create-project

2. Enter a Product name, for example "Litium Studio dashboard widgets". Adding a product logo is optional. Click Next.
google-create-project-2
 

3. Turn on the Analytics API and accept the terms and conditions, click on "APIs & auth" in the left menu tree. Find "Analytics API" in the list and click on the "OFF" button.
google-enable-analytics-api

4. Click Create on "Credentials" in left menu and then "Create new client id"-button
google-create-client-credentials

5. Enter the Authorized Redirect URIs and Authorized JavaScript Origins as below. Note that only www.mydomain.com should be changed to the customer domain name. If there are more than one domain add more rows. Click Create client ID button.

Authorized Redirect URI to enter: http://www.mydomain.com/LitiumStudio/Dashboard/WebUserControls/Widgets/Edit/GoogleLogin.aspx
google-create-credentials

6. Copy the Client ID and Client Secret key into Litium Studio. (See step 1.8.)
google-credentials-copy-client-information

7. Log in to Litium Studio backoffice and go to the Control panel/System Settings/Settings. Paste the Client ID and Client Secret and press Save.
control panel.png

9. Open the Web Analytics or E-commerce Analytics widget in Edit mode. Click the Log in to Google button.
logintogoogle.png

10. Enter your Google Analytics account credentials and login. Click the Tillåt åtkomst/Allow access button.
google allow access.png

11. In the widget, press Save.

The Google Analytics widgets are now ready to use. When future users log into back office and want to setup the Google Analytics widgets, only step 9 to 11 are required.

Is this page helpful?
Thank you for your feedback!