Validate URLs for Google Analytics
Check whether all URLs used in the body (a custom field where we store social media content) also have “proper” UTM tags, i.e., source, medium, and campaign. This ensures that we do not use any links that are not optimized for GA.
Configuration
Create a Custom smart text field and use the General parsing mode.
Expression
%{count(findPattern(%{issue.cfnnnnn},
"\b(?:https?://|www\.)\S*(?=.*utm_source=)(?=.*utm_medium=)(?=.utm_campaign=)\S\b"))
= count(findPattern(%{issue.cfnnnnn},
"\b(?:https?://|www\.)\S+\b")) ? "🟢" : "🔴"}
Please, note that it is necessary to replace nnnnn with the ID of the custom field containing the body (e.g. “Content).

A common use case would be to use the work item description for the social media content. The expression would then be:
%{count(findPattern(%{issue.description},
"\b(?:https?://|www\.)\S*(?=.*utm_source=)(?=.*utm_medium=)(?=.utm_campaign=)\S\b"))
= count(findPattern(%{issue.description},
"\b(?:https?://|www\.)\S+\b")) ? "🟢" : "🔴"}
Used parser functions
The links lead to the JWTC documentation because the parser functions are shared functionalities.