I've recently setup Web Analytic Connector (WAC). I'm now trying to customize the WAC string to return a static value in the utm_contact parameter when no link alias is assigned. By default this parameter returns the URL of the link.
Here is the initial code used, which does successfully deploy the email.
&utm_content=%%linkname%%
When I make the following edits, the email job cancels.
&utm_content=%%=iif(IndexOf(linkname,"http")>0, linkname,"unknownlink")=%%
I've used custom ampscript in the WAC strings before, but never in reference to the linkname personalization string. Is this possible? Any suggestions on how I might customize the utm_content output?
update
SFMC Support provided the following details on the email job that was cancelled after the WAC update.
MemberID: xxxxxxxxx JobID: yyyyy OMMSlotID zzzzzz
ExactTarget.OMM.InvalidScriptException: An error occurred when attempting to resolve a function call. See inner exception for detail.
Function Call: iif(IndexOf(linkname,"http")>0, linkname,"unknownlink")
Index: 208
Content Type: Text
Substitution Level: Subscriber
Message Context: Unknown
Error Code: OMM_SCRIPT_SYNTAX_ERR
- from OMMCommon -->
--- inner exception 1---
ExactTarget.OMM.InvalidScriptException: An error occurred when attempting to resolve a script expression. See inner exception for detail.
Script Expression: IndexOf(linkname,"http")
MemberID: xxxxxxxxx
JobID: yyyyy
Error Code: OMM_SCRIPT_SYNTAX_ERR
- from OMMCommon -->
--- inner exception 2---
ExactTarget.OMM.InvalidFunctionException: The specified attribute or custom object field name was not found for this client.
Function Call: IndexOf(linkname,"http")
Attribute or Field Name: linkname
Error Code: OMM_FUNC_SYNTAX_ERR
- from OMMCommon
Link alias values generated via personalization strings, AMPScript, or SSJS does not reflect in the %%linkname%% value.
(help.salesforce.com/…)