Using XML feeds

This feature isn't enabled for all accounts. To enable it, contact Google Marketing Platform customer support.

Google Sheets are recommended for feeds, but if you prefer, you can also use XML files. Learn more about how to manage XML feeds below.

Upload an XML feed

  1. Click New profile to create a new profile.
  2. In the Manage Data step, click New content to upload your feed.
  3. In the Manage Element step, select and enter the following values:
    1. Content source: Select Remote file.
      Note: If you are setting up a feed that is behind a username and password, Studio will not be able to ingest it initially. This means that for the initial setup and ingestion, you will need to download a copy of the XML and upload it from your local device by selecting Local file in "Content source".
    2. Format: Select XML.
    3. Feed URL: Enter your feed URL.
    4. Root node name: Select the one root node in your feed that contains the content you want to serve in your campaign. A root node is the standalone entity or collection corresponding to all the values of a single row in a feed (see the Supported formats section below for an example). You can select the root node through the ones available in the drop-down menu.
  4. Continue to set up your profile as you would for any non-XML feed.

Size limits

Studio treats each XML object instance the same as a row in a CSV. CSVs have a 300,000 row limit, and an XML file has a 300,000 object limit.

An XML file with 300,000 objects most likely contains more than 300,000 lines of XML, and is a very large file. Because of this, it's possible for your XML file to contain less than 300,000 objects and still exceed the 30 MB total file size limit for a dynamic creative. If the file is larger than 30 MB, you won't be able to upload or transform it.

Supported formats

One root node

The format below corresponds to the easiest XML structure supported by Studio. You can think of it as a Spreadsheet with 5 columns (fields): DefaultValue, ItemID, City, CTA, Image. Each line of a Spreadsheet is represented by a node in XML, included between the opening tag <city> and the closing tag </city>. In the below example, <city> is the root node, and it is repeated for each set of values served at a given impression.

<container>
    <cityname>
        <DefaultValue>TRUE</DefaultValue>
        <ItemID>1</ItemID>
        <City>New York</City>
        <CTA>Fly to the Big Apple</CTA>
        <Image>http://newyorkimage.png</Image>
    </cityname>
    <cityname>
        <DefaultValue>FALSE</DefaultValue>
        <ItemID>2</ItemID>
        <City>Los Angeles</City>
        <CTA>It's time for surfing</CTA>
        <Image>http://losangelesimage.png</Image>
    </cityname>
</container>
Any tags between the beginning <container> tag and the beginning <city> tag will be disregarded.

Once this feed is uploaded, you can assign the field value to each field as you would do for any other feeds. In this case, for instance, the "City" field will be assigned to the "Accurate Geo Type" field type.

Multiple root nodes

The example feed below contains multiple root nodes: <cityname> and <price>. Studio allows for one root node only to be selected for each Dynamic element. When you have an XML feed with multiple root nodes, you can do one of the following:

  • Select one of the two elements through the "Root node" drop-down menu in the Manage Element step of the Dynamic workflow. All the content in the excluded root node will be disregarded.
  • Change the feed structure by consolidating all your fields (in our example, the fields are: <DefaultValue>,<ItemID>, <City>, <CTA>, <Image>, and <Price>) within one root node only (either <City> or <Price> in this case) and re-upload your XML feed to Studio.
<container>
    <cityname>
        <DefaultValue>TRUE</DefaultValue>
        <ItemID>1</ItemID>
        <City>New York</City>
        <CTA>Fly to the Big Apple</CTA>
        <Image>http://newyorkimage.png</Image>
    </cityname>
    <cityname>
        <DefaultValue>FALSE</DefaultValue>
        <ItemID>2</ItemID>
        <City>Los Angeles</City>
        <CTA>It's time for surfing</CTA>
        <Image>http://losangelesimage.png</Image>
    </cityname>
    <price>
        <DefaultValue>TRUE</DefaultValue>
        <ItemID>3</ItemID>
        <Price>From $99</Price>
    </price>
    <price>
        <DefaultValue>FALSE</DefaultValue>
        <ItemID>2</ItemID>
        <Price>From $159</Price>
    </price>
</container>
Any content between the beginning <container> tag and the beginning <city> tag will be disregarded by Studio.

Unsupported formats

Nested nodes

The feed below presents nested nodes, as the <description> item includes <text> and <image> subitems. Nested nodes are not supported by Studio, so you need to remove them or change the structure of your XML feed in order to successfully upload your feed. In the example below, Studio would recognize the whole "<text>Great deals for this summer </text> <image>http://image1</image>” as content for the description field.

<container>
    <cityname>
        <DefaultValue>TRUE</DefaultValue>
        <ItemID>1</ItemID>
        <City>New York</City>
        <CTA>Fly to the Big Apple</CTA>
        <Image>http://newyorkimage.png</Image>
        <description>
            <text>Great   deals   for   this   summer</text><image>http://image1</image>
        </description>
    </cityname>
    <cityname>
        <DefaultValue>FALSE</DefaultValue>
        <ItemID>2</ItemID>
        <City>Los Angeles</City>
        <CTA>It's time for surfing</CTA>
        <Image>http://losangelesimage.png</Image>
        <description>
            <text>Don't   miss   our   great   offers</text><image>http://image2</image>
        </description>
    </cityname>
</container>

JSON objects

JSON objects such as the one below are not supported by Studio. You need to convert your feed into one of the supported formats (Google Sheets, .CSV, .XML) in order to upload your feed. 

{"menu": {
  "id": "file",
  "value": "File",
  "popup": {
     "menuitem": [
       {"value": "New", "onclick": "CreateNewDoc()"},
       {"value": "Open", "onclick": "OpenDoc()"},
       {"value": "Close", "onclick": "CloseDoc()"},
     ]
   }
 }}

 

Was this helpful?
How can we improve it?