Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed an issue that prevented Google Tag Manager to create scripts and delete connection #4457

Conversation

skamphuis
Copy link
Contributor

Fixes #4452
Fixes #4453

Summary

Both issues were found in the GTM Connector I previously contributed, but I found #4453 (Null Reference exception thrown on deletion of connection) to also occur with the GA Connector (which makes sense since the GTm Connector was initially a copy of that one).
To fix that I added null-checks in a few places.

The other issue is not a bug, but it's a valid point that it's not very friendly to make the user manually edit SiteAnalytics.config before being able to use the GTM connector.
So I added code to check siteanalytics.config for the presence of a script for it. If there is none, the default script is added. If there is any (which could be edited in the installation) it's not changed.

However, I have one issue in the code. To find SiteAnalytics.config, I wanted to use Globals.ApplicationMapPath, but that's now oboslete. The message tells me to Use Dependency Injection to resolve 'DotNetNuke.Abstractions.IApplicationStatusInfo' instead.
but to be honest, I have no clue how. So could anyone be of assistence here? @ahoefling maybe?

@valadas valadas changed the title Fix bug #4452 #4453 Fixed an issue that prevented Google Tag Manager to create scripts and delete connection Feb 7, 2021
@valadas
Copy link
Contributor

valadas commented Feb 7, 2021

I changed the title as we use it for release notes and titles need to be a bit 'human friendly'

Copy link
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks about right, considering how connectors are architected...

@valadas valadas added this to the 9.9.0 milestone Feb 8, 2021
@valadas valadas merged commit dd09285 into dnnsoftware:develop Feb 8, 2021
@skamphuis skamphuis deleted the feature/4452-GTM-Automatically-add-script branch November 23, 2022 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants