Hello There!

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

How to Implement Google Tag Manager in iOS Swift - Part 1 of 2

iOS with Swift

iOS with SwiftIn today’s era of mobile analytics, the implementation of the analytics with your mobile apps is extremely vital. From the analytics implementation survey carried out amongst a few enterprises, it is clear that they feel it’s very complicated to integrate analytics into their mobile app. Well, to make things simpler, Google has blessed us with their awesome tool that we all know as the Google Tag Manager. It’s a really compelling addition for the developers to integrate Google Analytics on any platform.

I am going publish a series of 2 blogs that will help you to integrate Google Tag Manager in iOS with Swift and get your data flowing in Google Analytics. In this blog post, we shall cover the basics for getting our tags ready and publishing container with Google Tag Manager.

Creating GTM Container

Create a Tag Manager account from tagmanger.google.com or use existing if you have created one already.

Under that account, create an iOS legacy container. Select container type iOS, SDK version Legacy iOS, give an appropriate name to the container and hit create button.

 

Google Tag ManagerYour container is now created! You can create tags, triggers and variables.

Let’s create a Screen View tag in the container - which should fire when any screen of the app opens.

Creating a ScreenView Tag

Go to Workspace -> Tags, and click New button.

mplement google tag manager in iOS

 

Now you will see two cards on your dashboard, Tag Configuration and Triggering. In Tag Configuration card you should set-up everything that is related to the tag that you are creating. Whereas for Triggering, you will create a triggering event on the occurrence of which above created tag will fire.

Select Tag Configuration card and select Universal Analytics tag type. Configure a tag as shown below.

tag manager for iOS apps

 

Select App View as track type since you are creating a screen view tag. Under Tracking ID field, set Google Analytics property ID. Click More Settings -> Fields to Set -> Add Field to add one key-value pair in the tag, a key will be the built-in variable called screenName and value will be {{screenName}} which is the datalayer variable that we shall cover as we move forward in this post.

Creating a Trigger

Now select the Triggering card and click ‘+’ icon from top right side of the layout and create a trigger as shown below.

 

app analyticsSelect Custom trigger type and configure this trigger to fire on some events when event name matches ‘openScreen’. Give appropriate name to trigger and save it. The “Trigger” is now added to your tag, give an appropriate name to tag and save it. This tag will fire from the app when datalayer event name matches ‘openScreen’.

Now create a datalayer variable, screenName, which you are using in your tag.

Creating a Variable

Go to Variables and select New under user defined variables section. You will see Variable Configuration card, select it and choose Data Layer Variable and configure variable as shown below.

 

Google Tag ManagerSpecify datalayer variable name as screenName using which this variable will be referred to. Check Set Default Value checkbox and set Default Value as NA so whenever this variable is used and its value is not defined then the default value will be pushed into the datalayer. Give appropriate name to this variable and save it.

The Screen View tag is configured perfectly, you can publish the container now.

Publishing the Container

Hit Submit button from the top right corner of the screen, a new layout will pop up. From submission configuration card, select Publish and Create Version and give a descriptive name to the version as shown below.

 

iOS with SwiftHit Publish button. That’s it! Your container is created.

Download the Container

You need to download a container as you shall be required to include it in your app as a default container. Go to Versions tab and click on Actions button for the container version which is Live and select Download option.

 

tag manager for iOS appsYour container published is with one Screen View tag and you have downloaded it now. You can include this container in your app as a default container.

Concluding Thoughts

Configuring an event or any other type of tags are also simple just like the process we described above. As a part of my closing thoughts, whenever you add, modify or delete something from the container, make sure you don’t forget to publish it, otherwise, the changes you have made will not reflect in your users’ app. As opposed to a website, in the case of an app, GTM takes a maximum of 12 hours to update the container in the app after publishing it. If your app is in the development stage, you can preview the container, or download and include it to update in your app. Before talking about updating the container, I shall take you through the process of integrating GTM SDK in the iOS app, in my upcoming blog post. Check out the second part of this blog series for getting started with Datalayer.

Edit Button for Google Analytics Custom Reports with Chrome Extension by Tatvic

chrome extension for google analytics

.cta{ background: #cd4746!important;color: #fff!important;font-family: ‘Oxygen’, sans-serif;font-weight: 700;}<br

chrome extension for google analytics

Google is constantly making efforts to make the world a better place with its products and services. Recently, Google Analytics was reborn with new features and a revamped desktop UI. These changes are rolling out globally on a gradual basis. We, as a reseller of Google Analytics, love the new features being rolled out. We are especially glad to have an insightful Homepage.

As the product is upgrading, we were exploring with the aim to get to know these changes in detail. One typical pain point is not having the “Edit” button on Google Analytics’ Custom Report. For us, it is a basic task to create a custom report and edit it on the fly while analyzing the data collected in Google Analytics.

Everyone on the floor was asking each other, “When will Google add this Edit custom report button?”. And the other person replies, “Don’t know about that but anyway you can go to the Custom Reports Overview page and select Edit from the Actions drop-down”.

edit button chrome extension

This dialogue exchange inspired an internal discussion, we arrived at a fruitful decision to work on creating and launching a Chrome Plugin that will provide an Edit button on a temporary basis. Having an Edit button on the Custom Report itself will ease the process of editing the report and checking the data repeatedly.

chrmose extension for editing custom reports in google analytics

Initially, we had released this extension only internally. But after receiving positive feedback from all the users, we decided to roll out this extension globally as it was actually serving a purpose.

How to get it?

You can get this extension from the Chrome Web Store or simply click on the below button.

Click on Add to Chrome button and Voila! You’re good to go. Check our extension in the action.

edit custom reports

Download the extension, use it, and send us feedback as to how you liked it and if there are any issues that you might face.

How to Track App Unintals in IOS & Android using Firebase? - Part 1/2

Blog App Uninstall Feaure Image

Blog App Uninstall Feaure Image

App uninstalls are the easiest thing to do on our smartphones, right? Enough blogs have mentioned the reasons behind these app uninstalls and a multitude of companies have done surveys too, reporting to reach at 10 worst reasons causing app uninstalls. For e.g. Google App Marketing Survey says an average app user has 36 apps installed on his/her smartphone. But they use only one-fourth of these apps daily. The remaining one-fourth that are never used are the ones likely to be uninstalled. Placing few other links in the references section.

app uninstallA Kantar/ITR study showed that an average of 26% of app installs are uninstalled in the first hour. That uninstall rate rises to 38% in the first day, 64% in the first month, and about 89% over 12 months. Those figures represent the average across all app types.
App Marketer’s KPI woes:

If you are a fellow app marketer or a product manager like me, you can feel the pain of a leaky bucket of users uninstalling your app mercilessly. We toil day and night to ensure a sprint app development process, user-friendly app features, and carve the simplest user journeys. We then market it just enough to make our app stay on top of Google Play Store rankings. All seems well and we are right on track to achieve that glorious milestone of 1 million app downloads. But our app analytics tools like Google Analytics, Firebase, Apsalar have a completely different story for us.

The report suggests that app uninstalls are on the rise this month, and your (well, mine too) KPIs for “number of active installs” indicates a churn rate of more than 40%.

What’s the Next Plan of Action?

Armed with the intelligence of the analytics tools, we decode the behavioral attributes of the users/ user segments who have uninstalled your app. The reasons behind most of the uninstall become our next app optimization and development tasks. But we almost forgot about the churned users. How do we win them back?

The first instinct is to take resort in our run-of-the-mill marketing activities.

  1. We run mailer campaigns with offers/marketing gimmicks if they had logged in with their email ids
  2. We send promotional SMS to user inbox if we had managed to capture their phone numbers.

And say, a majority of these users never logged in or gave their personal details to us. Now, as a consequence, we can never retarget them with personalization and the only thing left for us to do is just wait for these users to reinstall our app.

app uninstall

What’s the solution? Do we have a way to stop the users from churning in the first place?

Predictive Action to Stop Users from Churning?

Machine Learning Prediction Model is the answer. At Tatvic, our data science team has come up with a prediction model which feeds in scores of users, devices, and behavior features from the analytics tools and Tatvic’s internal Uninstall Library and predicts the probability of users who will uninstall within the next ‘n ‘ days. We call it PredictN Model.

Here is how it functions - in brief - we input the cohort of users who were acquired between any 15-day period along with their attributes. With previously trained data of identified churned users, PredictN Model will point out unique users from the said cohort who have more than 75% probability of uninstalling within 7 days.

  1. Retarget these users at once via Paid channels and Push notifications
  2. Understand the pattern of these unique users as to why they might be leaving your app from a geographic, demographic, device-specific, and/or behavioral perspective.
How does the model work?

Check this space to know more about model attributes and results in our next blog chapter.

A takeaway for reading till the end - heartfelt thanks, Feel free to reach out to us in case of any query or leave a comment in the section below on how you take predictive actions for uninstalls in your business.

 

Sources:

  1. https://apsalar.com/2016/01/all-about-app-uninstalls-2/
  2. https://www.linkedin.com/pulse/predicting-app-uninstalls-data-little-bit-science-arunachalam
  3. https://techinfographics.com/why-do-people-uninstall-apps/

Google Optimize 360 vs Optimizely vs VWO: Through an Infographic

infographic

There are few popular A/B Testing and Personalization tools in the market that truly stand up to the users’ expectations and provide a complete platform to plan, execute, test and monitor experiments. Enhancing user journey is a talk of the town these days and Google Optimize 360 is the newest entrant making it’s way up to businesses who are on the lookout to personalize their users’ journey on a website through targeted testing. In this post, we have drawn up a comparison between Google Optimize 360 and two other historically popular A/B Testing tools Optimizely and VWO. We hope this helps you understand these tools a little better and gives you an insights as to what Google Optimize 360 can do for you.

For any queries, further assistance or inquiries, please leave a comment in the section below and we’ll get back to you. Click here for an in-depth understanding of the Value Propositions of Google Optimize 360 and our Service Offerings for A/B Testing and Website Personalization.

Sources:

  1. http://rich-page.com/website-optimization/which-low-cost-testing-tool-google-content-experiments-vs-optimizely-vs-visual-website-optimizer/
  2. http://www.blastam.com/blog/google-optimize-360-vs-optimizely-royal-testing-rumble
  3. https://vwo.com/blog/what-you-really-need-to-know-about-mathematics-of-ab-split-testing/
  4. https://vwo.com/knowledge/ab-test-mobile-apps

How to implement Google Tag Manager for Android

featured_image

Editor’s Note: This blog has been updated on June 06, 2017 as per the latest version of GTM and Android

featured_image

At I/O 2013, Google added new features to the Google Tag Manager. They launched Google Tag Manager for Android and iOS devices. It is used in Mobile App along with Google Analytics to track various user behavior and help the marketers identify the trends, needs of users, app performance and other peculiar insights.

Google Tag Manager for mobile app developer devices also makes their development easy and dynamic. It enables the developers to change configuration values in their mobile applications using the tag manager interface, without having to rebuild and resubmit application binaries to the app marketplaces.

In order to walk through the implementation, you must be familiar with Android and iOS development to understand and implement tags for web analytics using Google Tag Manager.

Before starting implementing GTM, I recommend drafting a plan for tagging for google tag manager it will help to structure the core objective of data collection.

Steps to set up GTM in an Android Project (Click here or iOS)

  1. Create a Google Tag Manager Account
  2. Create a Mobile App container
  3. Note down the Container ID (It would be of the form of GTM-XXXXX)
  4. Add Google Play Services library to your project
    NOTE: Check for latest updated version of Google Play services library when adding it in project.Google tag manager
  5. Add the following permissions in your AndroidManifest.xmlGTM
  6. Also Add the Install Referrer Receiver in AndroidManifest.xml to track Campaign Data.Google Tag Manager for Android and iOS devices
  7. Now, Create a Trigger with the following configuration in Google Tag Manager Container.GTM for android
  8. Create a DataLayer Variable to fetch the value of screenName from the datalayer.GTM for iOS devices
  9. Create a Tag to fire the Screen View from the app.tag manager
  10. Add Google Tag Manager’s Default Container to your Project.
    • Within Google Tag Manager interface select VERSIONS -> ACTION -> DOWNLOAD this will download the container binary file.
      google analytics
    • Within your Android project, create a raw folder in project-root / res path.
    • Copy the downloaded binary file to the path project-root / res / raw with changing the filename to gtm_defaultcontainer_gtm_id.Google tag manager

Now, Let’s get started with initializing Tag Manager Instance and using DataLayer

  1. Create a ContainerHolderSingleton Class.
    ContainerHolderSingleton class is used to have access to a single instance of TagManager Object at a time.GTM
  2. Create a class ContainerLoadedCallback Class.
    ContainerLoadedCallback class is used to load the fresh GTM Container when it is availableGoogle Tag Manager for Android and iOS devices
  3. Initialize Tag Manager in Application Class of your app (Recommended) or First Screen of the App (i.e. Splash Screen or Main Screen)
  4. Load the latest container by specifying the CONTAINER_ID
  5. Use ResultCallback to return the ContainerHolder once it has finished loading or has timed out for fetching the latest container
    GTM for android
  6. After Initializing GTM well, it’s time to add the tracking code, which is implemented using the DataLayer Object.
    DataLayer provides a layer of persistence that you use to store data in key-value pairs form and then send it to Google Analytics.
    Create one method in general until class to push the openScreen event and start tracking the screen views from your app. You can call this method in onCreate()/onStart Method of your app activities with the screenName that you want to send.
    GTM for iOS devices

With the above steps performed we have successfully implemented the Google Tag Manager in Android. To know that your implementation is working well, verify your data in Google Analytics Report.

Also please note that to track any kind of action through GTM, an event must be pushed in dataLayer and for the very same event, a Tag must be configured in GTM Interface.

So, that’s it. This is how you can integrate Google Tag Manager version 4 container in your Android app. Recently, Google rolled out version 5 container for the app

Now, the question is which version should you use in your app. Stay tuned for the benefits of the version 5 container over the version 4 container and steps to integrate it.
Till then HAPPY TAGGING!

Google Analytics-JS Error Tracking Using Google GTM Events

javascript error tracking

javascript error tracking

What? How? Why? Was that your reaction when you read the title of my blog? Well, as a developer, it is important for us that the code we have written, should not break or should not be blocked by other scripts. Users are very creative these days - if at all tester misses some use cases, users will encounter some of those for sure. So, you need to make sure that your website is working well with every release and every publish of GTM.

It gives me immense pleasure to introduce Google Tag Manager’s unsung hero “Javascript error tracking feature”. GTM has this beautiful trigger named JavaScript Error ( also known as gtm.pageError dataLayer event ) enabled when any JS error occurs on the page.

Google Tag ManagerImage: javascript inbuilt variable in GTM

And to complement that trigger, it has built-in variables like

  • Error Message ( also known as gtm.errorLineNumber dataLayer variable : It will give value which represents the error description in string format
  • Error Url ( also known as gtm.errorMessage dataLayer variable ): It will give third party js file URL or any file URL which from which error occurred.
  • Error Line ( also known as gtm.errorUrl dataLayer variable ): This is an integer value that shows which line number has caused an error.

When javascript error occurs on site, GTM pushes a dataLayer which contains above-mentioned information with it and voila, you can now track errors in Analytics. Resolve those errors to improve the website performance.

Javascript Error Tracking

GIF: js error tag configuration

Precautions while implementing JavaScript Error Tracking:
  • Create a separate view to record these errors. Exclude them from Master view and the reason behind creating a new view for such tracking is that it will affect the actual user data by adding javascript error events in user’s session.
  • You can also restrict the JavaScript Error tracking to fire on specific conditions only
Usage of JavaScript Error Tracking:
  • Set alerts if your error rate reaches tocertainlevel. This will enable you tominimisethe risk in case of any important functionality on your website breaks down or gets affected via a third party script.Google Analytics Javascript error tracking

Image: Custom Alert for javascript error in google analytics

  • Know which third party scripts are causing issues. Fix them. Below screenshot shows which files are causing these errors.dataLayer variable in GTM

    Image: Custom Alert for javascript error in google analytics

JavaScript Error tracking provides a whole new avenue in which we can use data in Google Analytics. This data will help you identify glitches on the website and you will get a notification over mail or on phone based on the configuration set in custom alerts. The faster you act in such cases, the less damage takes place. Most importantly, improve your website performance by resolving the errors which block important scripts execution.

So, start tracking errors on website and get to know the culprits who are affecting your website performance and most importantly, act faster in disaster cases. Feel free to reach out to us in case of any query or leave a comment in the section below. We also provide Google Tag Manager & Google Analytics

Google Optimize 360 : The Power House of Personalization

Google Optimize 360

Google Optimize 360
In our previous blog on 5 UX trends, we covered topics like: What is personalization

  • What is personalization
  • How it works wonders for your user engagement
  • What benefits you reap by implementing personalization on your website and mobile site

Engaging prospects to convert and gaining frequent visitors to create a loyal customer base is a dream come true for every business. But, these trends are not as easy to implement on your website. It requires a right set of skills and an extremely powerful tool like Google Optimize 360 to create, test and adapt what you strategize.

In this blog, we will go through implementation a few of the UX trends mentioned in the earlier blog, using this tool. To know more about Google Optimize 360 features, please refer to this blog that I had written earlier.

1. Location-based Personalization - Geo Targeting with Google Optimize

Location based personalization can enrich the user experience. It is with great excitement that I am taking up this feature first. You can achieve location-based personalization using the geo-targeting feature of Google Optimize 360. India is a land of festivals. Let’s understand how location-based personalization will work in real-time for this scenario. Say in Gujarat and the festival of Navaratri - the world’s longest dance festival - is going on. During the same time in Bengal, the nine-day long Durga Pooja is on. Being an eCommerce store owner selling ethnic-wear, you want to roll out offers to both these sets of customers. With Google Optimize 360, you can customise your homepage slider or banner section to target these sets of users based on their geographical location.

time based personalizationImage 1: Geo-targeting with Google Optimize 360

2. Time-based Personalization - Javascript Variable or custom Javascript

What does the trick is, to implement a javascript variable with the “local day part” value. This gets updated based on the current time of the day. Use this variable to create time-based personalization. Let’s take one real-life scenario. Your e-commerce store experiences heavy traffic between 11 AM to 1 PM but the conversions are very low. To improve conversion rate, you can show banner or a countdown to sale timer with specific offers for this time period. Vice versa, let’s say in another time slot, traffic is lower and you want to increase that with user engagement. This is where you can put to use this time based personalised method in Google Optimize.

role based personalization

 

Image 2: Javascript Variable with Google Optimize 360

3. Cross-Selling

For running this personalization, you shall require an advanced implementation that enables you to identify user’s spending capacity. Using this information, you can create a “high intent users” segment in Google Analytics. Based on this segment, you can create an audience and use it as your target for cross-selling through Google Optimize 360.

Let’s take one example. You can create a segment of users who are brand conscious and then cross-sell products of similar brand using Optimize 360 audience targeting.

  • You can change sequence of brand filter or you can highlight same in filter section
  • You can also show products of similar brands using advanced implementation

You can also create an experiment which shows above combination in a test using Multivariate test feature of Google Optimize.
location based personalization

Image 3: Audience Targeting  with Google Optimize 360

4. Enhanced Shopping Experience

You can create a segment of users who dropped from, let’s say, for example, the checkout page after adding a product. Now, use this segment as audience targeting in Optimize 360. You now have wide options of getting back to them. Show popups with some offers or deliver product information when that user revisits your site and persuade them to complete their order.

Audience Targeting

Basically, marketers use audiences for remarketing and retargeting. The exciting part of Optimize 360 is to allow you to target your specific audience for your experiments. Using Google analytics segmentation feature, you can able to create audiences and use it in experiment targeting. This will help you to focus on your specific group of users who have some specific behaviour on your website. If you have Google Analytics 360 account, you should try out Optimize 360 to implement experiments and personalised experience by setting up targeting rule for your audiences.

  • High-Value Customer: A Usage of Audience Targeting

    In simple terms, high-value customer is your returning customer who contributes to your revenue growth over and over through repeat businesses or referrals. Personalising their experiences may lead to high conversions and also improve user engagement. You can slice and dice your data to separate your customers based on their actions, demographics and interests. You can the use it as audience targeting and measure the performance of your personalization campaign with Google Optimize 360. Similarly, you can create audiences like “Drop off at Checkout page/cart page”, “Added To Wishlist” and use it to enhance your user’s personalization experience.

What’s Next from Google: Adwords Integration with Google Optimize Account

There is an exciting update from Google regarding the upcoming integration between Google Optimize and Adwords. This will help digital marketers and testing teams to test their customized landing pages based on keywords, ad group or campaigns that are associated with ads.

enhanced shopping experience

In marketing next 2017 event, Google gives an example that how it will be beneficial to business that running campaign:

“Suppose a hotel wants to improve its landing page for the keyword family friendly hotels. Using Optimize, the hotel can create and test a new variation of the landing page, one that features an image of a family enjoying themselves at the hotel pool, instead of a generic image of the hotel exterior. If the new page leads to more reservations, they’ve got a win.“

This integration will be available for Optimize and Optimize 360 and will be launched in a few weeks.

Explore interesting personalization use cases across different domains with our upcoming webinar. Grab the chance of interacting with subject matter experts and get real life insights on implementing website personalization.

Bot Icon
Bot Icon

Tatvic Bot

Explore About Tatvic and Services