You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 17/umbraco-engage/developers/settings/custom-goals-scoring.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,8 @@ Creating the goal is similar to creating a page view or page event goal. The **g
22
22
23
23
To trigger the goal, execute C# code during the visitor's pageview. Inject `Umbraco.Engage.Infrastructure.Analytics.Goals.IGoalService`, which provides multiple overloads to trigger goals:
24
24
25
-
-`TriggerGoal(long goalId, int value)` - Using numeric ID
26
-
-`TriggerGoal(Guid goalKey, int value)` - Using GUID key (preferred)
25
+
*`TriggerGoal(long goalId, int value)` - Using numeric ID
26
+
*`TriggerGoal(Guid goalKey, int value)` - Using GUID key (preferred)
27
27
28
28
An implementation looks like:
29
29
@@ -56,7 +56,7 @@ The method automatically determines the current page view, linking the goal to a
56
56
57
57
To trigger a goal outside of an HTTP request or a valid pageview, use the overload of `TriggerGoal` that takes the GUID of the pageview.
58
58
59
-
Retrieve the pageview GUID in the original request using `Umbraco.Engage.Infrastructure.Analytics.Common.IPageviewGuidManager.GetPageviewGuid()`. You will need to store this pageview GUID for later use when invoking:
59
+
Retrieve the pageview GUID in the original request using `Umbraco.Engage.Infrastructure.Analytics.Common.IAnalyticsPageviewGuidManager.GetPageviewGuid()`. You will need to store this pageview GUID for later use when invoking:
60
60
61
61
```cs
62
62
// Using numeric goal ID
@@ -70,9 +70,9 @@ This custom goal can now be used like other goals and will show up in any statis
70
70
71
71
## Available Method Overloads
72
72
73
-
| Method | Parameters | Use Case |
74
-
|--------|------------|----------|
75
-
|`TriggerGoal`|`(long goalId, int value = 0)`| Within HttpContext/pageview, using numeric ID |
76
-
|`TriggerGoal`|`(Guid goalKey, int value = 0)`| Within HttpContext/pageview, using GUID key (preferred) |
77
-
|`TriggerGoal`|`(Guid pageviewGuid, long goalId, int value = 0)`| Outside HttpContext, using numeric ID |
78
-
|`TriggerGoal`|`(Guid pageviewGuid, Guid goalKey, int value = 0)`| Outside HttpContext, using GUID key (preferred) |
0 commit comments