Dynamic Content From CSV

Create and manage large-scale dynamic content using a CSV file instead of manual trigger versions.

About

Creating dynamic content with If-So triggers is simple and effective. However, when managing dozens or thousands of content variations, the setup can become time-consuming, and performance may be affected.

The Dynamic Content from CSV extension provides a more scalable approach. It lets you create and manage large numbers of dynamic content variations using a single CSV file, instead of building multiple trigger versions manually.

The extension integrates seamlessly with If-So and offers a flexible solution for a wide range of use cases.

It supports HTML content, works with all caching systems, and allows you to display dynamic content anywhere on your site, including within page templates.

How it works

The CSV extension lets you control dynamic content using a spreadsheet, where each CSV file (bulk) is tied to a single condition type (geolocation, query string, date and time, etc.).

Each row includes:

  • A condition value (Column A)
  • The content to display (Column B and beyond)

When a visitor meets the selected condition, If-So looks for a matching value in Column A and displays the corresponding content from that row.

This structure allows you to manage thousends of variations efficiently without creating multiple trigger versions manually.

Supported conditions

You can use the CSV method with the following conditions:

  • Query string (URL parameter)
  • Geolocation (continent, country, state, city)
  • User timezone
  • Date/time
  • Page URL
  • Post ID
  • User IP
  • User details (email / username)
  • Referral source
  • Custom user profile field

How to set up Dynamic Content from CSV?

Setting up dynamic content with the CSV extension is a simple 3-step process:

Step 1: Create a conditional bulk

Step 2: Set up the conditional content

Setting up and editing the bulk’s content is done directly in your dashboard. The bulk table behaves like a spreadsheet, so you can easily copy and paste content from a CSV file. If you prefer, you can also import a CSV file.

When adding your data, ensure it follows this structure:

  • Column A (The Condition Value): Enter the specific value that activates the row. The required format depends on the selected condition. For example, if the condition is Geolocation → Country, Column A should contain the country’s ISO code. If the condition is Query String, Column A should contain the parameter value.

    A ready-to-use CSV template (conditions and values included)

See the values that match your condition.

  • The Conditional Content Columns (B, C, D…): Enter the text or HTML you want to display. Using multiple columns allows you to place different parts of the same row (for example, a headline in Column B and a button in Column C) in different areas of your page.

Setting up a default (fallback) value

A default value is the value that will be displayed if the condition is not met. It can be left blank if you don’t want to show anything in this case.

To set a fallback for when no conditions are met, enter the value ‘default-content‘ in one of the rows

Set up default content

Step 3: Apply the bulk to your page or site

FAQ & Troubleshooting

  • Is CSV-based content compatible with page caching?

    Yes. The default Ajax loading settings apply to content that loads using the CSV extension.

    In addition, you can override the default settings by adding the parameter ajax=”yes” or ajax=”no” to the CSV shortcode.

  • Content in columns A is broken after uploading a CSV file or saving a bulk

    By default, the number of allowed characters in a single cell in column A is 55. This limitation is intentional to optimize the loading speed of the dynamic content for users who don’t need a higher number of characters.

    To change the max allowed number of characters in column A:

    1. Add the code below to your functions.php file.
    2. Visit one of your website pages (it will run the code).
    3. Remove the code from your functions.php file.
    function modify_content_column(){
        global $wpdb;
        $wpdb->query("ALTER TABLE {$wpdb->prefix}ifso_bulks_content MODIFY COLUMN version VARCHAR(100);");
    }
    add_action('init','modify_content_column');
    

    The code above will change the number of allowed characters to 100. You can replace the number in the code with any other number. Bear in mind that if your file consists of many dynamic versions (thousands), there might be some loading speed implications (they will probably be insignificant, but it is worth checking).

    Please note that if you reduce the number of allowed characters, the new number you set will affect content created in the past.

  • Content is broken after uploading a CSV file or saving a bulk (in any column except column A)

    By default, the number of allowed characters in a single cell (except column A) is 1024. This limitation is intentional to optimize the loading speed of the dynamic content for users who don’t need a higher number of characters.

    To change the max allowed number of characters in the relevant column:

    1. Add the code below to your functions.php file.
    2. Visit one of your website pages (it will run the code).
    3. Remove the code from your functions.php file.
    function modify_content_column(){
    global $wpdb;
    $wpdb->query("ALTER TABLE {$wpdb->prefix}ifso_bulks_content MODIFY COLUMN content VARCHAR(2048);");
    }
    
    add_action('init','modify_content_column');
    

    The code above will change the number of allowed characters to 2,048. You can replace the number in the code with any other number. Bear in mind that if your file consists of many dynamic versions (thousands), there might be some loading speed implications (they will probably be insignificant, but it is worth checking).

    Please note that if you reduce the number of allowed characters, the new number you set will affect content created in the past.

Didn’t find what you need?

Dynamic Content From CSV
Free
Requirements: If-So Pro

Spring Sale!

Up to 40% Off