Stop debugging Analytics yourself!

Théo Carrive
Cheerz Engineering
Published in
3 min readFeb 27, 2019

Or how to allow non-technical people to troubleshoot tracking events themselves, directly from their iPhone camera roll!

The pain of tracking

Tracking the way your users interact with your application is great. But maintaining, troubleshooting, checking the code implementation and documenting how your tracking plan is done on your app can be a huge pain.

  • Is this event well plugged? 🤔
  • What is the name of the event? 🥶
  • When is it triggered exactly? 🥺
  • Is this event triggered once or twice? 😱

If you recognize yourself in this situation, if you see people coming at you with very relevant yet very time-consuming questions, then, this article is for you!

We need to track tracking 🤯

To answer all of those questions, you can create documention. However, documentation can be vague, inacurate, and requires a lot of discipline and efforts to be kept up-to-date.

Wouldn’t it be great to instead allow marketing people to easily test the tracking plan, to check that it matches what they expected?

What we want, is to be able to say, proudly and the hands on our hips:

“Just play with the app, and all the tracking events will be saved in your photoroll! What an amazing world we live in, isn’t it?”

And if we think about it, that does not seem that hard… So, let’s do it!

Implementation

We have created a very silly and simple Pod called “EventShot” that:

  • Takes a screenshot of the main view
  • Adds a layer with some text information on it
  • Saves it on your photoroll

So, let’s import this in our Podfile:

pod 'EventShot'

Now we just have to trigger the screenshots for each event we track. We hook it in our tracking class :

Now, let’s build on our phone, let’s launch the app, navigate it to into it, and just go back in our camera roll:

Visualize your tracking plan from your camera roll

That’s it! We can now visualize the events that are sent directly from our camera roll! 🎉🎉🎉🎉🎉🎉🎉

Conclusion

Now, we can hand this app in the hands of any person of our company : Just a launch, and they will be able to see in their photos all the events that are sent to Google Analytics, or whatever tracker we use.

Tracking plan won’t ever be a mistery anymore!

Going further

  • ⚠️️️️⚠️️ You don’t want to enable EventShot recording in production. If you want to use this often and be able to keep it in your codebase you might want to enable EventShot recording based on your target.
  • If your app doesn’t include it already, don’t forget to add the appropriate key/value to your info.plist to request permission to access the photo library, otherwise, your app will crash!
  • The EventShot Pod is just a POC. Don’t hesitate to contribute to make it become something better!

Do you want to see more than what we’ve shown here?

Don’t hesitate to contact us, it would be a pleasure to talk, or even to welcome for you for a coffee at our office (France 🇫🇷-> Paris 🏙-> Place de Clichy / Saint Lazare 🚊)!

Just so you know, we are hiring engineers! Don’t hesitate to contact us, or check our page here!

--

--