-
Notifications
You must be signed in to change notification settings - Fork 751
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
Conversation
…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.
@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? |
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? |
@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. |
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. |
@mikesmeltzer and @mitchelsellers, are there any plans to integrate Google Tag Manager (GTM) as well? |
There was a problem hiding this 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
Mitchel,
I have some pending changes that I haven't committed yet based on the last round of feedback.
Please hold off on merging this until I push those. I'm currently out of the country and will touch base in a few days.
|
@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. |
@mikesmeltzer Do you have an ETA on the final changes? |
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. |
@mikesmeltzer Awesome! |
… button that essentailly resets all tracking code details. Add error handling for null fields.
@mitchelsellers I've pushed another change and edited the initial description. Should be ready for another review. |
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
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.
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.