googleanalytics / google-tag-manager-ios-sdk

Apache License 2.0
15 stars 10 forks source link

Manual initialization for Google Tag Manager #35

Open srawat-gd opened 3 months ago

srawat-gd commented 3 months ago

Title

Add support for manual initialisation of Google Tag Manager with custom JSON file location

Description

Currently, our package initialises Google Tag Manager (GTM) automatically, assuming the container file is in the PROJECT_ROOT. We need to enhance this functionality to support manual initialisation, allowing users to specify a custom location for the GTM container JSON file.

Proposed Changes:

A manual initialisation method for GTM. Allow users to provide the location of the JSON container file as a parameter. Update the package to use this custom file location instead of searching in PROJECT_ROOT.

Use Case:

This feature is crucial for using the package within other iOS packages or frameworks. It enables keeping the container file inside the package itself, rather than requiring it to be in the main project's root directory.

ShivamRawat0l commented 2 months ago

@htcgh Any update for this ticket ?