Beyond Limits: Dynamic Click Tracking Workarounds in SFMC journey engagement splits

 

Engagement Splits in Salesforce Marketing Cloud's Journey Builder are dynamic decision points that enable marketers to tailor customer journeys based on contacts' interactions with email messages. These splits evaluate whether contacts opened an email, clicked a link within it, or if the email is bounced. 

One of the major limitations of engagement splits is, it only supports static links within the tracked email. Dynamic links aren't yet supported. This is in the idea phase of the product, which you can up vote here.


In this blog post we will see a couple of work arounds to achieve dynamic click tracking in engagement split.


A suggestion from Salesforce team:

Salesforce proposes a workaround in this trailhead module according to which marketers run an automation to extract click data from the data view, updating a designated data extension. This data extension can subsequently be utilized for decision splits within journeys.

Details below from Trailhead Module itself:

Overall solution:

Sample Query:

1
2
3
4
5
6
SELECT c.Subscriberkey, c.EventDate as [ClickDate], c.linkName as [Link]
FROM [Click] c with (nolock)
JOIN [_Job] j with (nolock)
ON j.JobID = c.JobID
WHERE j.EmailID in ('238309', '238310', '238311')
AND c.LinkName = 'Event Registration'

Intermediate Cloud pages:

An alternative strategy involves directing dynamic links to be tracked to a cloud page. The intermediate cloud page then updates a data extension indicating that the link has been clicked and redirects to the actual link. This method can be used even when dynamic links contain parameters that must be passed to the final destination.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<script runat="server">
    Platform.Load("Core", "1.1.1");

    try {
        // Read parameters from the request
        var utm_source = Request.GetQueryStringParameter("utm_source");
        var utm_medium = Request.GetQueryStringParameter("utm_medium");
        var utm_campaign = Request.GetQueryStringParameter("utm_campaign");
        var utm_content = Request.GetQueryStringParameter("utm_content");
        var utm_term = Request.GetQueryStringParameter("utm_term");
        
        // Get the subscriber key from the URL parameter
        var Subscriberkey = Platform.Variable.GetValue("Subscriberkey");

        // Construct the redirect URL with the parameters
        var redirectURL = "https://llflooring.com/c/hgtv-dream-home-5-off/?utm_source=" + utm_source +
                          "&utm_medium=" + utm_medium +
                          "&utm_campaign=" + utm_campaign +
                          "&utm_content=" + utm_content +
                          "&utm_term=" + utm_term;

        // Redirect to the constructed URL
        Platform.Response.Redirect(redirectURL + '?s=pass');

        // Update the "Opt In" attribute in HGTV_Data_Copy DE to "Yes"
        var DEName = "Your_New_DE_Name";

        // Create a data extension row
        var row = Platform.Function.UpdateData(DEName, ["Subscriberkey"], [Subscriberkey], ["LinkName"], ["Yes"]);
        
    } catch (e) {
        // Handle any errors
        var desc = e.description; // Pulls the description from the error object
        if (desc.indexOf("ExactTarget.OMM.AMPScriptRedirectException") > -1) {
            Platform.Response.Write(desc); // This is arbitrary as will not be run
        } else {
            Platform.Response.Redirect(redirectURL);
        }
    }
</script>

Conclusion:

Both workarounds involve transforming engagement splits into decision splits, with the choice between them depending on specific scenarios. If there's a multitude of links to track in journeys, employing an automation with a separate data extension for each journey may be optimal. Alternatively, if real-time tracking is essential, leveraging cloud pages could be the preferred solution. Ultimately, the choice between these approaches hinges on the unique requirements of each use case.

No comments:

Post a Comment

Powered by Blogger.