Through the Smart Content and Smart Content FunnelEnvy Drupal modules, content administrators can trigger content blocks directly in the Drupal CMS from either FunnelEnvy Audiences or Campaign Variations.
The Smart Content module allows site administrators to display different content for anonymous or authenticated users based on browser conditions. The Smart Content FunnelEnvy module extends this capability by integrating with the FunnelEnvy client side API.
Installation & Setup
To enable this integration you must have an active FunnelEnvy user account, and the snippet must be present on the Drupal site.
Install the Smart Content module on your Drupal 8.X or 9.X instance - https://www.drupal.org/project/smart_content
Install the Smart Content FunnelEnvy module on your Drupal 8.X or 9.X instance - https://www.drupal.org/project/smart_content_funnelenvy
Triggering Smart Content Blocks from Audiences
Smart Content blocks can be activated if the visitor is a member of an FunnelEnvy Audience. To activate the block you'll need the Audience Id which can be found at the end of the URL on the audience detail page and typically is of the form: AXXXXXXX
(where each X is a number).
In Drupal go into the Structure tab and then into Block Layout. You'll want to place a new Decision Block in the section where the content decision should be made.
When you're configuring the block create a new Segment and use the Audience condition under FunnelEnvy. Click on "Add Condition" and enter the Audience Id of your FunnelEnvy Audience:
Finally you can add a display condition to control which content block is displayed if the visitor is in the Audience.
Remember to save the Block as well as the Block Structure and you're done. Whenever a visitor meets the FunnelEnvy audience conditions the Content block that you configured in Drupal will be displayed.
Triggering Content Blocks from Campaign Variations
You can also use FunnelEnvy's Predictive or A/B/n capabilities to trigger variations managed in Drupal Content Blocks. In this example we'll trigger two different content blocks based on two variations in a FunnelEnvy campaign.
In the FunnelEnvy campaign details you'll need to find the Variation Ids. These are typically of the form VXXXXXXX
(where X is a number).
In Drupal go into the Structure tab and then into Block Layout. You'll want to place a new Decision Block in the section where the content decision should be made.
While configuring the decision block we'll create two segments, one associated with a variation and each containing the Content Block to be displayed. This will ensure that when a variation is activated (either though prediction or random decision) the appropriate content Content Block will be displayed.
Select "Variation" as the condition (under FunnelEnvy) and enter the Variation Id from the FunnelEnvy campaign. Once complete the two segments should look like this:
Generally you'll want to have the same number of segments as you have variations in your campaign.
Remember to save the Block and Block structure and you're done. When a variation activates the corresponding content will be displayed in Drupal.