• Resolved sharktank

    (@sharktank)


    I want transfer linked data to hubspot. seems no data transferred to hubspot. i suspect it is because of nonstandard fields settings in the linked plugin.

    My goal is to trace gclid so i would able to trace lead and understand which leads brings me real value.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Mário Valney

    (@mariovalney)

    Hi. Hubspot have a way to change how data arrives?
    Just like Zapier it let user send any JSON data?

    If not, you must edit the output data.
    It’s not hard. Just use our hooks.

    As we merge data from special mail tags and contact form you can empty the first using ctz_get_data_from_special_mail_tags (or just do not add any Special Mail Tag option) and change data from ctz_get_data_from_contact_form.

    This way:

    add_filter( 'ctz_get_data_from_contact_form', 'sharktank_add_data_to_zapier', 10, 2 );
    
    function sharktank_add_data_to_zapier( $data, $contact_form ) {
        /**
         * Example from Hubspot "Create a New Subscription":
         * { "subscriptionDetails" : { "subscriptionType" : "company.propertyChange", "propertyName" : "companyname" }, "enabled" : false }
         *
         * @link https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview
         */
    
        $data = array(
            'subscriptionDetails'   => array(
                'subscriptionType'      => 'company.propertyChange',
                'propertyName'          => 'companyname',
                'anyProFromForm'        => $data['field-name'],
                'anyOtherPropFromForm'  => $data['other-field-name'],
            ),
            'enabled'               => false,
        );
    
        return $data;
    }

    Do not forget to add validations and so on…

Viewing 1 replies (of 1 total)
  • The topic ‘Can you help with the linked issue?’ is closed to new replies.