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

Add UI to Manage Google Analytic Tracking Code #2288

Merged
merged 2 commits into from
Oct 3, 2018

Conversation

mikesmeltzer
Copy link
Contributor

@mikesmeltzer mikesmeltzer commented Sep 4, 2018

Closes #2129

Summary

Added a new Connector extension project to the solution called DNN.GoogleAnalyticsConnector.

The connector adds the previously removed fields for managing the Google Analytic fields that were previously exposed in the Platform in prior versions of DNN. The fields should match the fields that were in DNN 8.0.4.

The connector also adds a new button for deactivating the analytic codes. This button is visible only when an analytics code is saved. Behind the scenes, this behaviour only clears the fields for the GA provider which is turn prevents the provider from writing code to the page. This isn't, however, a true deactivation of the GA Http Module and site analytics config.

Validation was added to verify that the Google Analytics tracking code is not empty.

How to Test

On an existing site that is using the core Google Analytics provider, you should be able to view and edit the previously defined tracking code settings. These settings are stored at the root of each portal folder within the GoogleAnalytics.config file.

On a new installation, you should be able to fill out the tracking code details and have them reflected within the page source after saving the screen. Additionally, the GoogleAnalytics.config file should now be visible on the root of the portal in question with the proper settings added to it.

After saving the tracking code, try deleting it and re-adding,etc.

Known Issues

  1. What I perceive to be a workaround for the showing/hiding the Delete Connection button was implemented due to some shortcomings in the connectors extension. This has been indicated with comments in both the C# and JS.

  2. Pressing cancel after the connector has been saved will make it appear that it is no longer saved. This appears to be an issue with the core connectors extension. Another issue will be created to review the connectors extension in general.

…acking code for the existing Google Analytics provider. In DNN 9 the ability to manage these settings was removed.

The fields from DNN 8.04 Google Analytics module were used. Tracking code validation added prior to saving to ensure the code is the proper format.
@dnfclas
Copy link

dnfclas commented Sep 4, 2018

CLA assistant check
All CLA requirements met.

@mitchelsellers mitchelsellers added this to the 9.3 milestone Sep 4, 2018
@mitchelsellers mitchelsellers added the Community Legacy label used to identify community contributions label Sep 4, 2018
@mitchelsellers
Copy link
Contributor

@mikesmeltzer Quick question on this, it looks good, but is there any ability to "disable" this once configured. The existing platform was limited as well, but if you wanted to disable tracking would it be possible to support that as well?

@mikesmeltzer
Copy link
Contributor Author

Mitch,

In its current state, and with DNN 8.0.4, you could remove the tracking code and save which would essentially disable the functionality.

To make that more clear, we could add some messaging to the screen to indicate how to disable it.

Thoughts?

@mitchelsellers
Copy link
Contributor

@mikesmeltzer THat might be good enough, I guess from what I remember if you remove the code, the script is still rendered on-page which is what I was hoping to avoid.

@mikesmeltzer
Copy link
Contributor Author

Let me double check if that completed removes it. If not, maybe I can add a checkbox or something else to disable it entirely.

My intent was like for like with what we had in the last version but if we can do a bit of a value add to then that is great.

@pjkruger
Copy link

@mikesmeltzer and @mitchelsellers, are there any plans to integrate Google Tag Manager (GTM) as well?

Copy link
Contributor

@mitchelsellers mitchelsellers left a comment

Choose a reason for hiding this comment

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

This appears to be working as the old one was working

@mikesmeltzer
Copy link
Contributor Author

mikesmeltzer commented Sep 14, 2018 via email

@ohine
Copy link
Contributor

ohine commented Sep 15, 2018

@mikesmeltzer No worries, we will hold off on merging till you let us know it's all set. Hopefully we can get it merged in before the first week of October so it can make it into the v9.3.0 release.

@mitchelsellers
Copy link
Contributor

@mikesmeltzer Do you have an ETA on the final changes?

@mikesmeltzer
Copy link
Contributor Author

I anticipate doing another commit today. The delete / remove analytics functionality has been added and now I'm just in the process of some final testing.

@mitchelsellers
Copy link
Contributor

@mikesmeltzer Awesome!

… button that essentailly resets all tracking code details. Add error handling for null fields.
@mikesmeltzer
Copy link
Contributor Author

@mitchelsellers I've pushed another change and edited the initial description. Should be ready for another review.

@ohine ohine merged commit ae74d56 into dnnsoftware:development Oct 3, 2018
@tpluscode tpluscode mentioned this pull request Oct 8, 2018
6 tasks
@mikesmeltzer mikesmeltzer deleted the bug/DNN-2129 branch October 19, 2018 12:22
@mikesmeltzer mikesmeltzer restored the bug/DNN-2129 branch October 19, 2018 12:23
@mikesmeltzer mikesmeltzer deleted the bug/DNN-2129 branch January 26, 2020 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Legacy label used to identify community contributions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants