Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Created April 24, 2015 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzocaum/7797559808aa8e939dad to your computer and use it in GitHub Desktop.
Save lorenzocaum/7797559808aa8e939dad to your computer and use it in GitHub Desktop.
How to send a custom tag for a contact during registration to Infusionsoft using the Infusionsoft integration for Event Espresso 3

You can currently tag contacts in Infusionsoft by using a meta field in the event editor for Event Espresso:

http://eventespresso.com/wiki/infusionsoft-integration/#ee3customizations

That method requires you specify the tag for each event.

You can use this code snippet to specify a global tag that will be used for all contacts. This is useful if you will be using a single tag instead of multiple tags.

First create a tag in Infusionsoft. There is a guide available here:

http://ug.infusionsoft.com/article/AA-00306/0/How-do-I-create-edit-or-delete-a-tag.html

Then locate the tag ID which will be a numeric number. You can find it by going to Infusionsoft --> Settings --> Tags. Get that number and then change 123 in the example code to your actual tag ID and save changes.

The sample code can be added to your child themes's functions.php file or a site specific plugin.

<?php
//* Do NOT include the opening php tag
//* Send a specific tag over to Infusionsoft
function ee_espresso_infusionsoft_save_extra_fields($cust_id) {
global $ee_infusionsoft;
$source_tag_id = 123;
$ee_infusionsoft->grpAssign($cust_id, $source_tag_id);
}
add_action('action_hook_espresso_infusionsoft_save_attendee_after', 'ee_espresso_infusionsoft_save_extra_fields', 100, 1);
@lorenzocaum
Copy link
Author

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment