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
Add EQUALS macro to allow for easier string output mapping
There is currently no support from available macros to map variable values that might be required by a vendor in their amp-analytics vendor file. To achieve multiple output string mapping, most of the vendors will need something that checks for equality - say a new EQUALS macro (that returns a===b) along with the existing $IF macro.
Assuming $EQUALS is added, then a required mapping like "A" -> 1, "B" -> 2, "C" -> 3 can be solved using:
Add EQUALS macro to allow for easier string output mapping
There is currently no support from available macros to map variable values that might be required by a vendor in their amp-analytics vendor file. To achieve multiple output string mapping, most of the vendors will need something that checks for equality - say a new EQUALS macro (that returns a===b) along with the existing $IF macro.
Assuming $EQUALS is added, then a required mapping like "A" -> 1, "B" -> 2, "C" -> 3 can be solved using:
Alternative
An alternative that uses the $REPLACE macro is shared here, but in general, it is cumbersome to implement and understand.
Additional context
This is originally discussed with @zhouyx in #18034
The text was updated successfully, but these errors were encountered: