i'm trying to use Google tag manager with Firebase analytics in my iOS project using this link. However, i'm not sure how can i test Google tag manager.
What i'm trying to do is to block some of the firebase analytics, so that i may have idea that GTM is working.
My code is:
@IBAction func logAnalytics(sender: UIButton) {
var parameters = [String: NSObject]()
parameters[kFIRParameterItemCategory] = "ViewController"
parameters[kFIRParameterContentType] = "logAnalyticsEvent"
parameters[kFIRParameterItemID] = nil
FIRAnalytics.logEventWithName(kFIREventSelectContent, parameters: parameters)
}
How i'm doing it on GTM console:
I created container (iOS) on GTM. Created variable, triggers and tag. Trigger for content_type contains 'logAlanyticsEvent'. And the tag to block these events.
Questions:
- These events are not being blocked. What i'm doing wrong? You can find GTM live version file on this link
- How to preview the version before making it live? I followed this link & added the urls in plist file. How to do the following step mentioned on this link:
Stop your application and open the preview URL on an emulator or physical device to preview the draft container in your application.
- It's said that we don't have to submit a new binary & GTM version is updated in app automatically. How? I've not written any code to refresh the container.
Please help.