Working with external dynamic content

Note

External dynamic content is different to dynamic content. If you wish to tailor content based on contact data, dynamic content is generally easier to use. You can find out more at our Using dynamic content in campaigns article.

To use external dynamic content, it firstly needs to be enabled in your account. Please contact us if you don't have access. 

Contents

Adding an external dynamic content block to your campaign
Setting up your external dynamic content block
Sending your campaign
How external dynamic content URLs which don't return data are handled
Link tracking
Limitations

Summary

External dynamic content enables you to provide campaign content through a URL endpoint. You can pass data to your URL by attaching contact data fields to the query string.

This article assumes you have your URL endpoint set up and ready to go.

Adding an external dynamic content block to your campaign 

Edit a campaign, and ensure the Build tab in the side panel is selected. Under the Building blocks section, there is a block called External dynamic content under 'Tools'. This can be dragged and dropped into your campaign.

Setting up your external dynamic content block

When an external building block is dragged onto a campaign, it will show Set up external dynamic content link. Click this to supply a name for the block, and also your URL endpoint.

The name is for your reference only, but we'll show it in the block's heading.

The address is the URL of your endpoint. The format of this URL matters; it must start with either 'http' or 'https', and the location of contact data fields (if used) is also important.

Examples of valid URL endpoints

http://example.com/handler.php?token=@EMAIL@

Where @EMAIL@ contains something like 'alias@example.com'.

https://example.com/handler/token/@DATAFIELD@

Where @DATAFIELD@ contains something like 'filename.php'.

http://www.example.com/php/@DATAFIELD@.php

Where @DATAFIELD@ contains something like 'filename'.

http://www.example.com/php/@DATAFIELD@

Where @DATAFIELD@ is a folder name, for example.

http://example.com/pathtest.aspx

Where no contact data fields are used.

Examples of invalid URL endpoints

@URISCHEME@example.com/handler.php

Where @URISCHEME@ contains 'http://' or 'https://'.

http://@DATAFIELD@/php/pathtest.php

Where @DATAFIELD@ contains a domain, for example.

Sending your campaign

A campaign containing external dynamic content may take longer to send than a regular send, as each individual send may require us to pull content from your webserver.

You should also note that whilst a triggered campaign is being sent using external dynamic content, it will not be editable until the send is complete.

How external dynamic content URLs which don't return data are handled

If a request for external dynamic content for a contact returns no content (an HTTP 204 status code), the contact is skipped but sending to the rest of the contacts continues. This is recorded and your report overview for the campaign will contain an 'Email skipped' section.

If your endpoint returns anything other than content or a 204 code, the send will be aborted.

The maximum wait time for an answer to a request is five seconds.

Link tracking

Links in external dynamic content blocks are tracked differently to links elsewhere in your campaigns. For link tracking to work, you need to ensure that:

  1. Either your account has Google Analytics configured, in which case any external links found in your external dynamic content blocks will be rewritten to have Google Analytics tracking information appended to them.
  2. Or your links are part of a link group.

Note: If you're not configured with Google Analytics and you don’t use link grouping, there will be no tracking on external dynamic content links.

Limitations

You can have a maximum of 20 external dynamic content blocks in any one campaign. However, as each block will make an HTTP request, and as HTTP requests are generally slow to make, high numbers of external dynamic content blocks may significantly reduce the send speed of your campaign.

Have more questions? Submit a request

Comments

  • Avatar

    How does it work in getting the external content.

    If we add External Dynamic Content and then send a campaign to 500,000 people. Will we get 500,000 requests to our server or do you scatter it?

    Also what if, for some reason, the endpoint script doesnt produce any output (maybe server error or timeout). Does the email still send with no cotent in it? or do you hold the email until you are able to get a valid response from the server?

    Great feature all in all. But knowing these details will make all the difference in how heavily we can rely on it.

  • Avatar

    Hi Luke,

    In your example, we'd make 500,000 requests to your server. We have to do this, as the content can change for each and every contact.

    Because of this, sending a campaign with external dynamic content is markedly slower than a normal campaign, and care should be taken that your web server can cope with the load.

    If the request returns an HTTP error, the send won't go. However, if the request returns a valid but empty response, the send will go (this allows you to only return content for a portion of your campaign for some of your contacts.).

    External dynamic content is powerful, but there are often easier (and quicker) ways of achieving the desired outcome. Feel free to talk to our Support or Account Management teams for more information.

  • Avatar

    Thats great, thanks.

    So can I stagger the sends over a certain amount of time to reduce server load...I know you can do this at the moment so combining the 2 features may help us?

    Its a great feature so I want to use it as much as I can...

  • Avatar

    Yes, if you're worried about your server load then combining this with throttled sending is a good idea.

  • Avatar

    Is there a plan to allow the extenal dynamic content to be populated during a test send? At the moment it doesnt show any content - making it quite difficult to actually test the campaign...

    Or if thats not possible to at least display it during the preview?? At the moment the only way to test its working is to do a live send...

  • Avatar

    Coming soon, we'll show a place-holder in Previews and Test Sends. We're not going to show the actual content, as so much of it is contact- and time-dependent. 

  • Avatar

    Hi, would this work in trigger campaigns?  for instance we want to pull in receipt / order details.

  • Avatar

    Following today's upgrade, external dynamic content place-holders are now shown in previews and test sends.

    @Nick - yes, EDC also works in triggered campaigns.

  • Avatar

    Hi Michael,

    We have just noticed that if you do a live send the external content gets brought in. However, if you click "View In Browser" then the email in web browser does not have the content in it.

    Is there any way of making it bring the contents in? I assume its just a simple CURL call that brings the content in anyway?

    I have added it as a feature request..

  • Avatar

    Hi Luke - showing external dynamic content in the web version of a campaign is something we're looking to introduce in the future.

  • Avatar

    Hi Michael,

    Where would I post a feature request for EDC?

     

     

  • Avatar

    Hi Luke - I'd put it in the General category, over at https://support.dotmailer.com/forums/86054-General. 

  • Avatar
    1. Say you are pointing to a HTML file, and the content of the HTML file contains some personalised content. Do you need to use query strings for the personalised content to get populated, or is it handled automatically?

    2. Is there, or will there in future, be a way to store external dynamic content on dotmailer's servers as a way of speeding up the sending process? I've seen other platforms that allow such dynamic content to be stored on their server and managed/updated via an API.

  • Avatar

    As an added to points to Matts point 2 above; I have always thought the sending could be easily made more efficient given the following scenerio:

    When you make the EDC request; if the Endpoint contains at least 1 personalized field (i.e Contains at least two @s) then work as it currently does and make a request for every contact one by one.

    However, if the Endpoint does not contain any personalized field then assume the content will always be the same and insert that into the placeholder for every campaign.

    So for example;

    I send a campaign to 100 people with EDC of http://www.mysite.com/content.php?email=@email@  =** 100 separate requests**.

    I send a campaign to 100 people with EDC of **http://www.mysite.com/aboutus.php = **1 request that gets cached by your server and then inserted for all 100 people.

    That way, we get faster send times. Your server gets a reduction in workload. Everybody is a winner.

    I have put this a feature request in the general section as per your advice Michael.

  • Avatar

    Firstly: I have updated the article above following our announcement that from February 19, links in external dynamic content won't be tracked. 

    Secondly, answers to some of your questions:

    @Matt Yes, external dynamic content can include personalisation markers. For example, if your URL endpoint returns @FIRSTNAME@, we'll translate this to a contact's first name, just like we would if it was anywhere else in a campaign.

    External dynamic content cannot be stored on our servers, and we're unlikely to allow this in the future. You can of course store small amounts on content in contact data fields, which can be populated via our API.

    @Luke Thanks for the suggestion. Unfortunately it doesn't work for all known cases, but it's not being ruled out either.

  • Avatar

    Hi,

    You could offer the option to make a request for every contact or once per campaign send. That way you give the user the ability to control the number of requests being made to the server . Plus you may get a reduced workload on your server...

  • Avatar

    Has  your UI changed?  I cannot find this: My Account > *Features **and ensure **Enable drag and drop external dynamic content  *Please advise.  Thanks.

  • Avatar

    Hi Eddie - yes, our UI has changed, but you still turn this on in the same way. Go to: Hi yourname! at the very top of the screen > Account Settings > FeaturesEnable drag and drop external dynamic content

  • Avatar

    "Features" does not exist under "Account Settings".  Any idea why?

  • Avatar

    @Eddie - 'Features' is a heading. If you count the green subheadings, it's the fourth one down.

  • Avatar

    Sorry, it's not.

     

  • Avatar

    Yeah, it really does @Eddie.

     

  • Avatar

    Are you the account holder? If not, you'll need to get them to turn this on for you.

  • Avatar

    I am not the account holder. I'll have this turn on. Thanks.

  • Avatar

    Awesome. We got there!  I'll update the article to make it clearer.

  • Avatar

    Hi Michael

    I want to use edc in trigger campaigns to reference an image on a website and I enter the url of the hosted image in the edc block and just get a load of characters and symbols all over the email body. Also, I wanted to know if the edc can reference the link the image has around it.

    Thank you

    Daniel

  • Avatar

    Hi Daniel - if your endpoint points to a URL that returns an image path, and the image path is being corrupted somehow, then that doesn't sound right at all. Feel free to drop us a note at  support@dotmailer.com if you'd like us to take a look.

    If your end point is the image path, then I'd recommend reconfiguring it as above.

  • Avatar

    Hi Michael

    I have had this through support and account managers several times over a year now and no-one knows or can help (this is not a complaint by the way as this is the only time something has ever been like this and support are great). Can you give me an example of an image url I can put in the edc block that will work. It asks for a link/url so after mine failed to work I put in your logo url...

    http://www.dotmailer.com/media/1071/logo_n

    and it didn't work - what am I doing wrong. The box asks for a name and a url only and all I get is a page of code type characters in the email body.

    Thanks Michael

     

  • Avatar

    Hi Michael,

    Does the endpoint to a URL have to be uniquely created every time an abandoned basket or discount code email is sent? Or can they be duplicated?

    Thanks

    Cassie

  • Avatar

    Is there any scope for this to work with image files ie using  /image.jpg instead of having to set up a URL with the image on it?

    I tried this but got a tonne of wingdings in the email!

    Thanks,

    Mike

Powered by Zendesk