The #msdynmkt_trackingcontext appended to your URLs by Dynamics 365 Marketing is not directly related to UTM tracking or click tracking. Here's a detailed explanation:
Purpose of #msdynmkt_trackingcontext
This hash (#) fragment is part of Dynamics 365 Marketing's native tracking mechanism. It is used internally to pass tracking context for marketing interactions (e.g., email clicks, form submissions, etc.) between the Dynamics environment and your website.
The hash fragment is not sent to the server when a browser requests the page—it is processed on the client side (by JavaScript). Therefore, it typically does not interfere with UTM parameters unless your website is configured in a way that interprets it incorrectly.
Why It Doesn't Affect UTM Parameters
UTM parameters are part of the URL's query string (preceded by ?). The fragment (preceded by #) is separate and does not interact with or overwrite UTM parameters.
Most analytics tools (e.g., Google Analytics) ignore fragments like #msdynmkt_trackingcontext.
Potential Issues:
If your website incorrectly interprets the hash fragment, this could lead to unintended behavior. For example:
If your website or scripts treat the # as an anchor or attempt to parse it for navigation purposes, it might cause errors.
How to Disable It
Unfortunately, Dynamics 365 Marketing does not provide a built-in way to disable the #msdynmkt_trackingcontext. However, you have a few options to work around this:
1. Custom Script to Remove the Fragment: You can use JavaScript on your landing page to remove the #msdynmkt_trackingcontext.
2. Update Website Behavior: Adjust your website's scripts to ignore the # fragment or avoid interpreting it as an anchor.
3. Test UTM Tracking: Before removing it, verify whether the #msdynmkt_trackingcontext is essential for your email click tracking. If not, you can proceed with mitigation.
Click Tracking Without It
Click tracking for UTM parameters is managed separately:
If you toggle on UTM tracking in Dynamics 365 Marketing, it ensures the correct UTM parameters are appended to the URL. These parameters are used by analytics platforms to track the source, medium, campaign, etc.
The #msdynmkt_trackingcontext is mainly for Dynamics' own purposes and does not impact your UTM tracking in analytics tools.
If the hash fragment is problematic, you can safely remove or work around it, as Dynamics should still track clicks and UTM parameters via the query string.