Custom API Embed
Useful for pulling ad or external content into your newsletter apart from using content sources.
Place the following query just before the closing </head> tag in your email code. This querys the endpoint and places data in the 'ad1' Twig variable.
You can use standard twig notation to display, loop, manipulate the contents of the ad1 variable. The following code shows a few different options:
Dump the raw contents of ad1 to see the data
Display each field individually (notation will change based on the JSON data structure)
Display fields in basic HTML
Using conditionals to display a fallback ad/image/html block when there is no data in the ad1 variable.
Last updated