-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da6fbf2
commit 3ca9984
Showing
6 changed files
with
214 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,43 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Blazor.GoogleTagManager | ||
namespace Blazor.GoogleTagManager; | ||
|
||
/// <summary> | ||
/// Options for <see cref="GoogleTagManager"/>. | ||
/// </summary> | ||
public class GoogleTagManagerOptions | ||
{ | ||
/// <summary> | ||
/// Options for <see cref="GoogleTagManager"/>. | ||
/// GTM-ID. | ||
/// </summary> | ||
public class GoogleTagManagerOptions | ||
{ | ||
/// <summary> | ||
/// GTM-ID. | ||
/// </summary> | ||
public string GtmId { get; set; } = string.Empty; | ||
public string GtmId { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// Google Tag Manager script attributes. | ||
/// </summary> | ||
public Dictionary<string, string> Attributes { get; set; } = new(); | ||
/// <summary> | ||
/// Google Tag Manager script attributes. | ||
/// </summary> | ||
public Dictionary<string, string> Attributes { get; set; } = new(); | ||
|
||
/// <summary> | ||
/// Name of the event pushed when page-view is tracked. | ||
/// </summary> | ||
public string PageViewEventName { get; set; } = "virtualPageView"; | ||
/// <summary> | ||
/// Name of the event pushed when page-view is tracked. | ||
/// </summary> | ||
public string PageViewEventName { get; set; } = "virtualPageView"; | ||
|
||
/// <summary> | ||
/// Name of the variabel to be used for URL when page-view is tracked. | ||
/// </summary> | ||
public string PageViewUrlVariableName { get; set; } = "pageUrl"; | ||
/// <summary> | ||
/// Name of the variabel to be used for URL when page-view is tracked. | ||
/// </summary> | ||
public string PageViewUrlVariableName { get; set; } = "pageUrl"; | ||
|
||
/// <summary> | ||
/// Allows to print logs in the browser console. Do not use in production. | ||
/// </summary> | ||
public bool DebugToConsole { get; set; } | ||
/// <summary> | ||
/// Allows to print logs in the browser console. Do not use in production. | ||
/// </summary> | ||
public bool DebugToConsole { get; set; } | ||
|
||
/// <summary> | ||
/// Specifies whether to import the JavaScript <c>'_content/Blazor.GoogleTagManager/GoogleTagManager.js'</c> file automatically. | ||
/// <para> | ||
/// If you disable this option, you must manually import your own JavaScript via the <c>script</c> tag. | ||
/// </para> | ||
/// Default is <c>true</c>. | ||
/// </summary> | ||
public bool ImportJsAutomatically { get; set; } = true; | ||
} | ||
/// <summary> | ||
/// Specifies whether to import the JavaScript <c>'_content/Blazor.GoogleTagManager/GoogleTagManager.js'</c> file automatically. | ||
/// <para> | ||
/// If you disable this option, you must manually import your own JavaScript via the <c>script</c> tag. | ||
/// </para> | ||
/// Default is <c>true</c>. | ||
/// </summary> | ||
public bool ImportJsAutomatically { get; set; } = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.