{"id":137469,"date":"2025-03-16T13:36:42","date_gmt":"2025-03-16T13:36:42","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/gtmtips-useful-gtm-for-ios-tips\/"},"modified":"2025-03-16T13:36:42","modified_gmt":"2025-03-16T13:36:42","slug":"gtmtips-useful-gtm-for-ios-tips","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=137469","title":{"rendered":"#GTMTips: Useful GTM For iOS Tips"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p>A while ago I wrote a blog post about how to install <a href=\"https:\/\/tagmanager.google.com\">Google Tag Manager<\/a> for iOS using the Swift programming language (you can read the article <a href=\"https:\/\/www.simoahava.com\/analytics\/setup-google-tag-manager-ios-with-swift\/\">here<\/a>). I\u2019ve been doing a lot of work with Swift lately, and I\u2019m more and more convinced that GTM is actually a very powerful utility for running in your iOS app instead of the <a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/ios\/v3\/\">Google Analytics SDK<\/a>.<\/p>\n<p>Why? Because it abstracts a lot of the nitty-gritty you\u2019d otherwise need to explicitly manage in your GA installation. Also, by using the <code>TAGDataLayer<\/code> interface, you\u2019re abstracting stuff <em>yourself<\/em>, not forced to adopt any specific syntax or semantic structure in your tracking. Instead, you\u2019ll be leveraging generic key-value pairs and an object structure, which you\u2019re probably already familiar with if you\u2019ve worked with GTM for the web.<\/p>\n<p>In any case, here\u2019s a bunch of tips I\u2019ve discovered while working with the SDK. Some of them might be quite evident, but they\u2019re useful nevertheless. Also, I\u2019ve learned that nothing is 100% self-evident in the world of GTM.<\/p>\n<p>                <span class=\"simmer\"><br \/>\n  <span class=\"close\">X<\/span><\/p>\n<p>\n    <span class=\"fa fa-md fa-bell\"\/><br \/>\n    <strong>The Simmer Newsletter<\/strong>\n  <\/p>\n<p>\n    Subscribe to the <a href=\"https:\/\/www.simoahava.com\/newsletter\/\">Simmer newsletter<\/a> to get the latest news and content from Simo Ahava into your email inbox!\n  <\/p>\n<p>  <\/span><\/p>\n<h2 id=\"tip-35-bunch-of-gtm4ios-tips\">Tip 35: Bunch of GTM4iOS tips!<\/h2>\n<div style=\"aspect-ratio: 960 \/ 540;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2015\/12\/ios-swift-gtm-tips.jpg\" title=\"iOS Swift Google Tag Manager tips\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"540\" width=\"960\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2015\/12\/ios-swift-gtm-tips.jpg#ZgotmplZ\" alt=\"iOS Swift Google Tag Manager tips\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>The tips are:<\/p>\n<ol>\n<li>\n<p>Dispatch the Tag Manager \/ GA queue when the application is entering background \/ terminating<\/p>\n<\/li>\n<li>\n<p>Log verbosely and set dispatch interval to 1 second only when debugging<\/p>\n<\/li>\n<li>\n<p>Purge <code>dataLayer<\/code> in between pushes<\/p>\n<\/li>\n<li>\n<p>Use the <code>dryRun<\/code> of the <code>GAI.sharedInstance()<\/code> to avoid sending data to GA<\/p>\n<\/li>\n<li>\n<p>Get the Google Analytics Client ID from the tracker instance<\/p>\n<\/li>\n<li>\n<p>Switch IDFA on in your Tags<\/p>\n<\/li>\n<\/ol>\n<h3 id=\"1-dispatch-the-tag-manager--ga-queue-when-the-application-is-entering-background--terminating\">1. Dispatch the Tag Manager \/ GA queue when the application is entering background \/ terminating<\/h3>\n<p>One of the rather ugly default features of the Google Analytics and Google Tag Manager SDKs is that they have a <strong>120 second<\/strong> batch interval. It makes a lot of sense when the app is running, as it preserves battery et cetera, but it\u2019s nasty when the app is in the background. Basically, it forces the app to \u201cwake up\u201d after 120 seconds of down time, just for the queue to dispatch.<\/p>\n<p>In <strong>AppDelegate<\/strong>, you have a bunch of useful functions, which you can use to run commands when the app is ready to do something. Also, the <code>TAGManager<\/code> implementation has the method <code>dispatch()<\/code>, which lets you send all the hits that are currently in the dispatch queue. So, by combining these two, you can empty the queue whenever the app is about to enter the background or terminate!<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-swift\" data-lang=\"swift\"><span style=\"color:#00a\">func<\/span> <span style=\"color:#0a0\">applicationDidEnterBackground<\/span>(application: UIApplication) {\n    tagManager.dispatch()\n}\n\n<span style=\"color:#00a\">func<\/span> <span style=\"color:#0a0\">applicationWillTerminate<\/span>(application: UIApplication) {\n    tagManager.dispatch()\n}<\/code><\/pre>\n<\/div>\n<h3 id=\"2-log-verbosely-and-set-dispatch-interval-to-1-second-only-when-debugging\">2. Log verbosely and set dispatch interval to 1 second only when debugging<\/h3>\n<p>If you\u2019ve set <a href=\"https:\/\/developer.apple.com\/library\/prerelease\/ios\/documentation\/Swift\/Conceptual\/BuildingCocoaApps\/InteractingWithCAPIs.html#\/\/apple_ref\/doc\/uid\/TP40014216-CH8-XID_13\">preprocessor macros<\/a> (you should!), you can execute code only when in a certain environment, such as QA, staging, or production.<\/p>\n<p>GTM also provides verbose logging, and you can set the dispatch interval of the request queue (see the previous tip) manually. Now, combine all these in a bowl, stir well, and you\u2019ll get some really powerful debugging tools.<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-swift\" data-lang=\"swift\"><span style=\"color:#4c8317\">#if<\/span> !<span style=\"color:#4c8317\">ENV_PROD<\/span>\n    tagManager.logger.setLogLevel(kTAGLoggerLogLevelVerbose)\n    tagManager.dispatchInterval = NSTimeInterval(<span style=\"color:#099\">1.0<\/span>)\n<span style=\"color:#4c8317\">#endif<\/span><\/code><\/pre>\n<\/div>\n<p>The first command sets the logging level to verbose, and the second one sets the dispatch interval to just one second. Both commands are only executed if the environment <strong>is not<\/strong> ENV_PROD, thus covering ENV_QA, ENV_TEST, ENV_DEBUG etc. These are, of course, just examples, and your setup probably uses some other names.<\/p>\n<p>You can utilize the <code>#if DEBUG<\/code> further in the <code>containerAvailable<\/code> callback, which is invoked when a container is first opened. Now, if you\u2019re debugging the GTM implementation, it\u2019s possible you\u2019re also updating the container in Google Tag Manager as well, and you might want to see changes immediately rather than having to <a href=\"https:\/\/developers.google.com\/tag-manager\/ios\/v3\/#containerOpener\">wait the 12 hours<\/a> for the container to go stale. So, modify the callback accordingly:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-swift\" data-lang=\"swift\"><span style=\"color:#00a\">func<\/span> <span style=\"color:#0a0\">containerAvailable<\/span>(container: TAGContainer) -&gt; <span style=\"color:#0aa\">Void<\/span> {\n    dispatch_async(dispatch_get_main_queue(), {\n        <span style=\"color:#00a\">self<\/span>.container = container;\n        <span style=\"color:#4c8317\">#if<\/span> !<span style=\"color:#4c8317\">ENV_PROD<\/span>\n            container.refresh()\n        <span style=\"color:#4c8317\">#endif<\/span>\n    });\n}<\/code><\/pre>\n<\/div>\n<p>See that <code>container.refresh()<\/code> there? That fetches a container over the network every single time, as long as you\u2019re not in an environment named ENV_PROD.<\/p>\n<h3 id=\"3-purge-datalayer-in-between-pushes\">3. Purge <code>dataLayer<\/code> in between pushes<\/h3>\n<p>In my <strong>Analytics.swift<\/strong> module (see <a href=\"https:\/\/www.simoahava.com\/analytics\/setup-google-tag-manager-ios-with-swift\/\">this article<\/a> for more information), I call the following function just after <code>dataLayer.push()<\/code> where content or hit-scoped custom dimensions are passed. To keep things consistent, I\u2019ve created a <code>dataLayer<\/code> syntax, where all content data is stored under the key <code>contentData<\/code>, and all eCommerce data is stored under the key <code>ecommerce<\/code>. I have other collections as well, such as <code>metaData<\/code> and <code>userData<\/code>, but these I want to persist, so the purge is not called after they are used.<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-swift\" data-lang=\"swift\"><span style=\"color:#00a\">private<\/span> <span style=\"color:#00a\">static<\/span> <span style=\"color:#00a\">func<\/span> <span style=\"color:#0a0\">purgeDataLayer<\/span>() -&gt; <span style=\"color:#0aa\">Void<\/span> {\n    dataLayer.push([\n        <span style=\"color:#a50\">\"contentData\"<\/span>: <span style=\"color:#a50\">\"\"<\/span>,\n        <span style=\"color:#a50\">\"ecommerce\"<\/span> : <span style=\"color:#a50\">\"\"<\/span>\n    ])\n}<\/code><\/pre>\n<\/div>\n<p>Yes, pushing blank strings is a clumsy way to purge the structure but it works. Basically, every time after content data and ecommerce data have been pushed into <code>dataLayer<\/code> and subsequently processed by GTM, I call <code>purgeDataLayer()<\/code> to ensure that this hit-scoped information does not persist.<\/p>\n<h3 id=\"4-use-the-dryrun-of-the-gaisharedinstance-to-avoid-sending-data-to-ga\">4. Use the <code>dryRun<\/code> of the <code>GAI.sharedInstance()<\/code> to avoid sending data to GA<\/h3>\n<p>I\u2019m actually not sure why you\u2019d want to do this, since you can just send your debug hits to a secondary Google Analytics property. But if you do want to avoid sending any data to Google Analytics, and just look at the verbose logs to see if things are working, you can set this flag in the Google Analytics tracker instance.<\/p>\n<p>Yes, I\u2019m aware this isn\u2019t GTM-specific, but it works with GTM-created trackers as well!<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-swift\" data-lang=\"swift\">GAI.sharedInstance().dryRun = <span style=\"color:#00a\">true<\/span><\/code><\/pre>\n<\/div>\n<p>A simple tip, no doubt.<\/p>\n<h3 id=\"5-get-the-google-analytics-client-id-from-the-tracker-instance\">5. Get the Google Analytics Client ID from the tracker instance<\/h3>\n<p>Again, this is more Google Analytics than Google Tag Manager, but it works in the latter as well. All trackers created via the GA or GTM SDKs have the same Client ID, which persists until you clear all settings and content in the app.<\/p>\n<p>To get the Client ID, run the following commands:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-swift\" data-lang=\"swift\"><span style=\"color:#00a\">let<\/span> <span style=\"color:#a00\">tracker<\/span> = GAI.sharedInstance().trackerWithTrackingId(<span style=\"color:#a50\">\"UA-12345-1\"<\/span>)\n<span style=\"color:#00a\">let<\/span> <span style=\"color:#a00\">clientId<\/span> = tracker.<span style=\"color:#00a\">get<\/span>(kGAIClientId)<\/code><\/pre>\n<\/div>\n<p>Now <code>clientId<\/code> has the GA Client ID, and you can do whatever you wish with it. In other words, you can actually use the string <strong>\u201cUA-12345-1\u201d<\/strong> if you wish, since it would have the same Client ID as the actual tracker (with the real Universal Analytics property ID).<\/p>\n<h3 id=\"6-switch-idfa-on-in-your-tags\">6. Switch IDFA on in your Tags<\/h3>\n<p>This is a very simple tip, as there\u2019s really almost no customization required. All you need to make sure is that the following Pod is loaded in your Podfile:<\/p>\n<p><code>pod 'GoogleIDFASupport'<\/code><\/p>\n<p>This loads the IDFA library, and you won\u2019t need to do anything else in your Swift app. The only other thing you\u2019ll need to do is switch on the <strong>Enable Advertising ID Features<\/strong> in your GTM Tags.<\/p>\n<div style=\"aspect-ratio: 752 \/ 350;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2015\/12\/enable-idfa.jpg\" title=\"Enable IDFA GTM\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"350\" width=\"752\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2015\/12\/enable-idfa.jpg#ZgotmplZ\" alt=\"Enable IDFA GTM\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Now your app will be sending the <strong>&amp;idfa;<\/strong> parameter with your device\u2019s IDFA identifier, and you can set on your <a href=\"https:\/\/support.google.com\/analytics\/answer\/2799357?hl=en\">demographics reports<\/a> and your <a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/ios\/v3\/campaigns#ios-install\">iTunes install campaign tracking<\/a> and whatnot via GA.<\/p>\n<h2 id=\"summary\">Summary<\/h2>\n<p>That\u2019s it for this group of tips! I have lots more to share around Google Tag Manager for iOS, but I can\u2019t extinguish my entire tip collection in one single post.<\/p>\n<p>I hope you found these useful! Do you have other tricks up your sleeve?<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>A while ago I wrote a blog post about how to install Google Tag Manager for iOS using the Swift programming language (you can read the article here). I\u2019ve been doing a lot of work with Swift lately, and I\u2019m more and more convinced that GTM is actually a very powerful utility for running in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":137470,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[32680,14492,3554,3535],"dealstore":[],"offerexpiration":[],"class_list":["post-137469","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-gtm","tag-gtmtips","tag-ios","tag-tips"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>#GTMTips: Useful GTM For iOS Tips - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=137469\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"#GTMTips: Useful GTM For iOS Tips - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"A while ago I wrote a blog post about how to install Google Tag Manager for iOS using the Swift programming language (you can read the article here). I\u2019ve been doing a lot of work with Swift lately, and I\u2019m more and more convinced that GTM is actually a very powerful utility for running in [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=137469\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-16T13:36:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ios-swift-gtm-tips.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=137469#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=137469\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"#GTMTips: Useful GTM For iOS Tips\",\"datePublished\":\"2025-03-16T13:36:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=137469\"},\"wordCount\":1131,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=137469#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ios-swift-gtm-tips.jpg\",\"keywords\":[\"GTM\",\"GTMTips\",\"iOS\",\"Tips\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=137469#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=137469\",\"url\":\"https:\/\/fivemor.com\/?p=137469\",\"name\":\"#GTMTips: Useful GTM For iOS Tips - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=137469#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=137469#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ios-swift-gtm-tips.jpg\",\"datePublished\":\"2025-03-16T13:36:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=137469#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=137469\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=137469#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ios-swift-gtm-tips.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ios-swift-gtm-tips.jpg\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=137469#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"#GTMTips: Useful GTM For iOS Tips\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"#GTMTips: Useful GTM For iOS Tips - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=137469","og_locale":"en_US","og_type":"article","og_title":"#GTMTips: Useful GTM For iOS Tips - Som2ny Network","og_description":"A while ago I wrote a blog post about how to install Google Tag Manager for iOS using the Swift programming language (you can read the article here). I\u2019ve been doing a lot of work with Swift lately, and I\u2019m more and more convinced that GTM is actually a very powerful utility for running in [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=137469","og_site_name":"Som2ny Network","article_published_time":"2025-03-16T13:36:42+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ios-swift-gtm-tips.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=137469#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=137469"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"#GTMTips: Useful GTM For iOS Tips","datePublished":"2025-03-16T13:36:42+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=137469"},"wordCount":1131,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=137469#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ios-swift-gtm-tips.jpg","keywords":["GTM","GTMTips","iOS","Tips"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=137469#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=137469","url":"https:\/\/fivemor.com\/?p=137469","name":"#GTMTips: Useful GTM For iOS Tips - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=137469#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=137469#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ios-swift-gtm-tips.jpg","datePublished":"2025-03-16T13:36:42+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=137469#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=137469"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=137469#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ios-swift-gtm-tips.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/ios-swift-gtm-tips.jpg","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=137469#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"#GTMTips: Useful GTM For iOS Tips"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/137469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=137469"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/137469\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/137470"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=137469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=137469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=137469"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=137469"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=137469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}