Install a GTM container from another GTM container - google-analytics

I work in an industry where it's very common to have multiple GTM containers and multiple Google Analytics IDs installed on a single site. Each install supports a different 3rd party vendor, interested party, etc.
I'm trying to develop a solution where a "master" Google Tag Manager container can install "child" GTM containers, so that clients can use a single GTM container to manage all of these installs rather than maintaining them via source code. (Another artifact of the industry is that these vendors change a lot, so it's common to need to add and remove tracking code regularly.) .
I haven't been able to find any guidance on this...does anyone have any?

In the commercial version of GTM this is an actual feature called "zones" (where each linked container is a "zone"). This does basically want you want to do, since alternative zones can be loaded conditionally (i.e. based on hostname). Even apart from the price tag the feature is not perfect, though - for example each zone loads all of the GTM boilerplate code, so will load way more JS that you actually need.
For the free version you are basically out of luck. In theory you can implement an alternative GTM container via a custom HTML tag - that worked for me during some casual testing a while back, but is completely with any support and explicitly goes against Google's recommendations, so you probably do not want to use this in production.
A workaround might be the "environments" feature, if you load a different configuration in each environment, but while this might save your clients the trouble of changing a five or six digit id in their source code it would make maintaining the containers a nightmare.

Related

How to connect Google Analytics to Symfony 4?

I have a small blog on Symfony 4. I need to add views to the articles. Decided to use Google Analytics. But I did not find the normal documentation how to connect Google Analytics to the symfony 4.
In general, you simply have to append a script tag that is provided in Google Analytics' web interface. See either this or this answer on the help resource. Perhaps, that would be the best option for you, since you just have a simple blog. The script should probably be added in your base template, or the layout so that it renders just above the closing </body> tag.
Another option would be setting up a server-to-server interaction with GA. There are several bundles for that: one, two. But most probably you won't need that.
You can simply put the script in your default base layout like the conventional base.html.twig. If you want to minimize the interaction with the layout you can create a Twig function that returns the Tracking ID stored in parameters.yml, either use bundle that provides extra features for interaction with your server, have a look for GoogleAnalyticsBundle which is still maintained by a symfony core developer.

Google Tag Manager - Handling Multiple Regions Within One Domain

A similar question to this has been asked already but didn't address my query.
My company are expanding into multiple territories. These will be located within the one domain (we'll say domain.com), but the other territories will be in multiple subdirectories, such as:
domain.com/uk
domain.com/in
domain.com/us
domain.com/ie
We will be using Google Tag Manager to track the performance of our multiple campaigns, landing pages, and website as a whole.
How would we handle the adding of the container to the site, so that we'll be able to track the performance across different regions?
Would we require one container for the whole of domain.com, or would we need separate containers for domain.com/ie, ../uk, etc.?
I think you might want to create a separate view for each market in Google Analytics
You don't need a separate GTM container
Keep the default unfiltered view
For each region, create the filter specific to your filter
Example from Google
That mostly depends if you are expecting to have a similar GTM setup for all your directories; in that case it would be easiest to use the same container for all. If you have broadly similar tags you can just switch tracking ids where necessary via lookup table variables that match tracking ids to directories.
If your county setups in GTM wildly differ it would probably be more maintainable to have different containers instead of writing lots of specific triggers and trigger exceptions.
So this is not so much a technical decision (both a single or multiple containers will work), and more a question of what tags you want to deploy per territory and how you want to organize your work. But most of the time a single container should be fine.
If you are a 360 Suite customer you could have a global container with all tags common to all directories, and set up "zones" with the stuff specific to a territory that are loaded depending on the directory.

Managing Multiple Unrelated Projects with Phabricator

I'm trying to figure out a way to make Phabricator manage several unrelated products. I installed Phabricator, imported a few source repositories and customized the side menu by adding all the default Phabricator applications (just to get an idea of what Phabricator offers "out of the box").
At first, I liked what I saw, but after spending a bit of time exploring, it started to appear Phabractor is just a collection of various SCM tools that are not linked together. I'm really looking for a set of top level "Products" and under each I can create various related Wiki Pages, Tasks/Bugs, [sub]Projects, Uploaded Files, Legalpad entries, etc.
What I am seeing, for example, is a general Wiki Engine (Phriction) that is no way linked to a Project or a top-most Product. Also, I can create a Legalpad document, but again cannot assign it to a project or product. Same with Files I upload. Even my imported source code repositories are just floating out there without any link to a Project or Product.
Am I missing something? Is anyone using a single instance of Phabricator to manage multiple unrelated products with potentially different groups of end users?
One potential work-around is I could setup a custom Dashboard for each of my products and link in the associated projects, tasks and even links to related wiki pages, but seems like a lot of work for each product and it still seems there is no way to categorize Uploaded Files and Leagalpad.
#Flagrama answers is most of the reality. If you want simple hard separation like you could find in other tools like Redmine, Phabricator is not conceived this way.
Now there is something that could make thing a little more natural: Phabricator Spaces.
It allows to split things pretty neatly. You can see the doc here:
https://secure.phabricator.com/book/phabricator/article/spaces/
In Phabricator you can create a Project. You can set it up so that anybody can join it, or so only administrators can add users. You can also make projects only visible/joinable to members of other projects.
"Visible to Members of Project..." is the basis of managing unrelated projects in Phabricator. Every repository you create, page you add to the Wiki, file you upload, or LegalPad document you create can be set to only be visible to members of a certain project.
Unfortunately I'm pretty sure this is the limit of Projects in Phabricator at present so it may still not meet your needs.
Phabricator is very flexible and includes several different ways to organize your work and your workflows.
Spaces
Another answer already suggested that you could try Spaces, which is a sort of global grouping and that can be used to isolate everything within one space and keep it almost entirely separate from everything that's in another space.
Projects
Phabricator also has a concept of "Project Tags" which you can use to organize tasks, repositories, blog posts and various other "Objects" within the various Phabricator applications. Most objects support one or more tags and the tags are defined by Projects which you create. Tags can be used as free-form labels or you can create a hierarchy of projects and sub-projects.
I'll go into a bit more detail about using Phabricator's Projects feature since that is how I've used Phabricator so that is what I'm familiar with.
Organizing your work with with Projects and Tags
Create a top level project for your tool, product, team or whatever makes sense in your situation.
Tag the repositories, wikis pages, blog posts, tasks, etc which belong to the project created in 1. using the project's #hashtag.
Customize the menus on your project to link to related repositories, wikis, documentation, etc. The project menus are quite flexible, as are other "profile" menus such as dashboards and user favorites menus.
Use the project's workboard to manage tasks related to the project.
Create subprojects, milestones, etc as needed.
6, Repeat 1-5 for each project you work on.

Google Tag manager code added with the help of DTM is not working

I had a request to add Google tag manager to our website and i added it using Dynamic Tag Manage (DTM). I created a page load rule and added this script. But my client is saying it is not working as DTM adds the code to the page with an Iframe. Is there a way we can fix this issue?
Alternative is directly add in the page. I don't want to go in that route as we have to update our page templates for these tags.
Avoid adding Tag Manager code in any other tag containers. It is built to be a standalone tag management solution and Google won't provide support if it's embedded in a 3rd party solution.
Your best option is to just select one tag management solution and stick with that. Having multiple tag managers kind of defeats the purpose, no?
You should never use one TMS to deploy the code of another TMS. None of them were designed to be deployed in that manner and all sorts of bad / odd things could happen.

How do I integrate my website with AICC for LMS

I want my website to be published as content in an LMS, one of the experts suggested me to use either SCORM and AICC. They suggested that we should make a wrapper around our website and then publish it on the LMS. Now I tried to search and read about SCROM and AICC but was not able to get any idea or how the wrapper has to be built.If someone can guide me with a blog or make steps of how should we achieve this.
Essentially, you have a few e-Learning Content Libraries out around the internet in a free and paid capacity. The primary job is to locate the LMS Runtime API. Your implementation is possible, but it would take some careful packaging and some custom work to get it done.
Every e-learning developer has to commonly build a Shareable Content Object player. This can be done using a IFRAME that loads pages. This allows the main page the LMS launches to load once, and unload once. Another route modern content takes, is to use AJAX to load in snippets of HTML and have a similar paging feel without the overhead of the IFRAME.
The next hurdle is trying to mitigate the cross-domain policy...
As you mentioned you could go AICC mainly because its cross-domain enabled. AICC is a bit more limited in what you can record though. Keep in mind this standard predates XML. So we are in the text with delimiters category of configuration.
SCORM is going to have a cross-domain security (sandbox) error associated with the JavaScript on your website trying to talk to the LMS. There is away around this, by possibly including your base index.html page which can use your JavaScript, CSS, Images on your website. But, if your website changes pages, we are back to my above comment. We need to wrap this in a IFRAME.
In the IFRAME scenario, you'd have to put your e-learning standard library there. And your sub pages in the IFRAME could talk to the parent. This ensures your main page and all sub pages have a line of sight to parent of the frame and can make calls if its present.
All of this really depends on how you built your website. We run content off media servers similarly, and have these same hurdles, but the content is meant to be activities, games, and tests/quizzes. If you adjust your website to try and communicate this way you'll have to pad it for working with and without a LMS and any runtime data.
You can still launch a website as a asset though. Not graded as a option. Some commonly do this as part of a lesson where the student can read something, then take a test on it in a subsequent assignment.
Good Luck,
Mark

Resources