Docs · Installation guide

Install a DML Collection.

Embedded Collections are easy to integrate into your site — just a couple of lines of HTML and JavaScript. Generate your embed code with the Embed Wizard in the DML Marketplace, then drop it in.

Generate an embed code

Open the DML Marketplace and choose the collection you want to embed — for example, California Education by EdSource. Click Embed for free to open the Embed Wizard, then select your layout and item count. The Wizard generates the embed code you'll paste onto your site.

Embed a Collection

There are three ways to add a Collection, depending on how your site is built.

Option 1 — Add to a single page

Copy and paste the generated embed code onto any page to try it out.

Copy
<div data-stackid="A-60343746069e4df486f8a3c2c14ff6e6" class="dml-widget-container" data-layout="threebyn" data-items="3"></div> <script async src="https://c.go-fet.ch/a/embed.js"></script>

Option 2 — Install site-wide

Add the script once inside your <head> tag:

Copy
<script async src="https://c.go-fet.ch/a/embed.js"></script>

Then drop a container wherever you want the Collection to appear:

Copy
<div data-stackid="A-60343746069e4df486f8a3c2c14ff6e6" class="dml-widget-container" data-layout="threebyn" data-items="3"></div>

Option 3 — Google Tag Manager

Option A. Create a Custom HTML tag containing the embed script, add your trigger, then place the DML container in your page template:

Copy
<div id="dml-placeholder" class="dml-widget-container"></div>

Option B. Create a Custom HTML tag that sets the collection ID on the placeholder and loads the embed script:

Copy
<script> var stackid = "A-60343746069e4df486f8a3c2c14ff6e6"; var placeholder = document.getElementById("dml-placeholder"); placeholder.dataset.stackid = stackid; </script> <script async src="https://c.go-fet.ch/a/embed.js"></script>

Add your trigger, then place the container in your template:

Copy
<div id="dml-placeholder" class="dml-widget-container"></div>
Note: Replace the stackid with your desired collection ID. Tested with Page View and DOM Ready triggers.

Alternate layouts

You can pick a layout in the Embed Wizard, or set it manually with the data-layout attribute:

Copy
<div data-stackid="A-60343746069e4df486f8a3c2c14ff6e6" data-layout="sidebar" class="dml-widget-container"> </div>
  • Default (4×1) No attribute required.
  • threebyn 3×1 collection.
  • twobyn 2×2 collection.
  • oneplus3 One large image with three smaller images below.
  • sidebar Sidebar layout for 300px-wide columns.

Full-page layout

Full-page Collections fill the page body with a list of articles.

Step 1

Create an empty page using your standard section template.

Step 2

Copy and paste the embed code. Replace the stackid value and adjust data-items as needed:

Copy
<div data-stackid="A-60343746069e4df486f8a3c2c14ff6e6" data-layout="fullpage" data-items="20" class="dml-widget-container"> </div> <script async src="https://c.go-fet.ch/a/embed.js"></script>

Section layout

DML Sections fill the page body with multiple collections.

Step 1

Create an empty page using your standard section template.

Step 2

Copy and paste the embed code, replacing the sectionid value accordingly:

Copy
<div data-sectionid="A-60343746069e4df486f8a3c2c14ff6e6" class="dml-section-container"></div> <script async src="https://c.go-fet.ch/a/embed.js"></script>

Need a hand?

We'll help you get embedded.

Questions about installation? Reach us at support@distributedmedialab.com.