With the help of Eliot Harper and Hans Meijer I started to develop a newsletter that contains salesforce marketing cloud web recommendations. However I don't know how it is possible to create a picture with a href that has tracking functionality inside the newsletter and tracking functionality of the recommendation system.
- The variable @link2 contains the web recommendation url that points to the https://nova.collect.igodigital.com/redirect/...
- The variable @image2 contains the imageurl of the product catalog of salesforce.
- The variable @linkwithhref2 contains the complete href
set @linkwithhref2=Concat('href="',@link2,'"')
I tried these options:
Option 1:
<a alias="" conversion="false" data-linkto="https://" href="%%=v(@link2)=%%" style="text-decoration:none;" title=""><img src="%%=v(@Image2)=%%" style="padding: 0px; height: 250px; width: 250px; border-width: 0px; border-color: transparent; border-style: solid; text-align: center;" width="250"></a>
Result 1:
- Good: Tracking functionality of the newsletter works (wrapped to https://click. ...)
- Bad: Clicking the image results that the redirect goes to https://click.ourdomain.com/%%=v(@link2)=%%, which is a bad request
Option 2:
<a alias="" conversion="false" data-linkto="https://" href="%%=TreatAsContent(@link2)=%%" style="text-decoration:none;" title=""><img src="%%=v(@Image2)=%%" style="padding: 0px; height: 250px; width: 250px; border-width: 0px; border-color: transparent; border-style: solid; text-align: center;" width="250"></a>
Result 2:
- Good: Tracking functionality of the newsletter works (wrapped to https://click. ...)
- Bad: Clicking the image results that the redirect goes to https://click.ourdomain.com/%%=TreatAsContent(@link2)=%%, which is a bad request
Option 3:
<a alias="" conversion="false" data-linkto="https://" %%=TreatAsContent(@linkwithhref2)=%% style="text-decoration:none;" title=""><img src="%%=v(@Image2)=%%" style="padding: 0px; height: 250px; width: 250px; border-width: 0px; border-color: transparent; border-style: solid; text-align: center;" width="250"></a>
- Bad: Tracking functionality of the newsletter does NOT work (no link wrapping to https://click.ourdomain.com ...)
- Good: Clicking the image results that the redirect goes to https://nova.collect.igodigital.com/redirect/..., and then redirects to our website, which is the behaviour we want to achieve.
How can i combine both functionalities (click tracking inside the newsletter and click tracking of recommendations). Any comments or hints welcome :)