Gravity forms submission cannot be attributed to affiliate

Hi, I am using afiiliate pro and gravity form elite. I have created a gravity form. I have included affiliate name and affiliate email in the form submission. Anyone who register a warranty and is referred by an affiliate gets free pair of insole and also the affiliated is given free pair of insoles. The problem I face is that the form is not recorded in the affiliate referral section. When I checked the option to store direct referrals, the entry was in the direct referral though I had entered the correct affiliate name and email. Here is the form. https://www.happyfeet.net/warranty-registration/
Thanks

Posted in

Comments

9 responses to “Gravity forms submission cannot be attributed to affiliate”

  1. George Avatar

    Hey Michael,

    At this point and after viewing the product page someone get’s redirected to after the form – which is a Woo product page -, I think it’s better if you describe the whole process that someone follows. If it helps you may also provide a screen-share of this process.

    What is the type of form you are using in Gravity Forms?
    Do you validate the form data being submitted? Especially for affiliates, if the affiliate data filled (username, email doesn’t matter), don’t belong to a valid affiliate, what happens? Does the process continue to WC or something else?
    Do you use WC only for the product purchase?
    When should the referral be recorded, after submitting the form or after checkout on WC?

    Apologies for all these questions but there are details coming up on each follow-up, which might be significant for what you’re looking for.

    Kind regards,
    George

  2. George Avatar

    H Michael,

    What you are describing is more complicated than what you have in mind and allow me to explain why.
    Assuming that you have constructed a URL containing the affiliate username. This operation will be executed when the form is submitted, using data submitted on the form (the missing part) and at the same time the referral for this form submission will also be calculated when the form is submitted (via the Affiliates Gravity Forms integration). Due to these two different requirements that need to be fulfilled when the form is submitted, the end result will be a new Affiliates Gravity Forms integration.

    On the other hand if you use Gravity Forms Coupons, name each of your affiliates’ assigned coupons accordingly – ie the name of the affiliate is also the coupon attributed to the affiliate -, then your affiliates will only share their code and the referral will be calculated properly, without any other further implementations.

    Kind regards,
    George

    1. MICHAEL BURCH Avatar
      MICHAEL BURCH

      Hi George, our visitors are redirected to this page after they enter a valid Bogo code.
      https://www.happyfeet.net/product/bogo-pair-of-happyfeet/#gf_1.
      Bogo codes are also not unique. We have assigned same code to two different affiliates. The only unique thing I see here on this form is affiliate email. I have tried the coupon option, but it didn’t work for me. I assigned the coupons accordingly, i.e. the name of the coupon was that of the affiliate name. I doubt there is something wrong with the affiliate integration settings. Here is a screenshot of this settings.
      https://www.happyfeet.net/wp-content/uploads/2024/05/affiliate-setup.png
      Is there a way to extract the username based on the email fields? Actually, our affiliates have already shared their email addresses, names and these bogo codes (not unique) with the persons they refer. My client is not willing to have a form setup so that affiliate username needs to be filled. I want it to be filled dynamically with the username field (extracted from email with the help of some programming). Thanks

  3. George Avatar

    Hi Michael,

    Using the email address, you can get the user for this email and then get the particular affiliate mapped to that user, with the help of Affiliates_Affiliate::get_user_affiliate_id( $user_id ) which returns the affiliate_id.

    Of course the email address is a unique identifier, but Affiliates Pro is not designed this way.
    Since this used to work and now it doesn’t, am I right to assume that you’ve been also using additional customizations to support it?

    Kind regards,
    George

    1. MICHAEL BURCH Avatar
      MICHAEL BURCH

      Hi George, I use affiliate by usernmae extension along with affiliate pro. The ID field will therefore not help me construct a URL. I use confirmation to redirect to an order page after form submission. I want to construct the URL of that page using query strings so that it is appended with ?affiliates=username. Please provide a code similar to [Affiliates_Affiliate::get_user_affiliate_id( $user_id )] so that the username is extracted.
      And also, please guide me on where I should place this code.
      If I take a hidden field for username and populate it based on the input from the email address field, will it help me acheive the results, just an idea. I constructed a similar code using gravity forms documentation but it didn’t work. Thanks

  4. MICHAEL BURCH Avatar
    MICHAEL BURCH

    Hi George, I checked the cookies and it had no entry for wp_affiliates. I then used the username of affiliate instead of name and the cookie was present then. I then use the query tags to include the affiliate username in URL i.e. affiliates=wp_affiliates_hf (this cookie holds the username of affiliate). How can I achieve similar result with the help of an email.
    I wonder why the cookie was not there when I was using email address of the affiliate, it’s also a unique identifier. Before, we had no issue with the form. The users were recorded as referrals based on these codes and email. I don’t know what happened; it suddenly stopped working. The code that has been used on this website is being populated with a variable promo. Also, we use a custom form made with gravity form for affiliate registration. We have marked them correctly in the affiliate section of the gravity form to be used for affiliate registration.

  5. George Avatar

    Hey Michael,

    You’re welcome, thanks for mentioning additional details on your setup. In order to track referrals without affiliates sharing their links, you need to use coupons, or the Bogo code you already have. Each Bogo code should be set as an affiliate attribute for each affiliate, and must be unique. More information on how to set affiliates attributes can be found in the documentation: https://docs.itthinx.com/document/affiliates-pro/affiliate-program-management/managing-affiliates/affiliate-attributes/

    Also, worth mentioning that according to Gravity Forms documentation and in order to use a Coupon Field, the Form should have at least one Product Field and one Total Field.
    Reference: https://docs.gravityforms.com/creating-a-feed-for-the-coupons-add-on/

    Kind regards,
    George

  6. MICHAEL BURCH Avatar
    MICHAEL BURCH

    Hi George, thanks for your prompt reply. Actually, our affiliates don’t share their referral links with customers. Instead, they share their affiliate name and email along with a Bogo Code. These details are taken from users while they fill out the form, and then the user is recorded as a referral for that affiliate. I think you got my point. Here is a link to the registration form. https://www.happyfeet.net/warranty-registration.
    Thanks

  7. George Avatar

    Hi Michael,

    Welcome to our support forum and many thanks for using our Affiliates plugin on your site.

    Have you checked the affiliate cookie while testing, after a referred visit on your site? What happens when testing and after following an active affiliate’s URL, is the affiliate cookie being stored?
    You can check this on your browser following the instructions described here:
    https://www.cookieyes.com/blog/how-to-check-cookies-on-your-website-manually/
    At this point, you are looking for a cookie named wp_affiliates and its value is the affiliate id that referred this visit.

    Also, in case you have your Dashboard and your frontend open on the same browser while testing, then such referrals won’t be recorded because the option for Auto-referrals and auto-coupons is disabled by default.
    Reference: https://docs.itthinx.com/document/affiliates-pro/setup/settings/referrals/

    Last but not least, please also have another look at your Form settings for Affiliates. In case this is a referral form, then the appropriate option should be enabled and a referral rate must be created even with an amount of zero.
    References:
    https://docs.itthinx.com/document/affiliates-pro/setup/settings/integrations/gravity-forms/
    https://docs.itthinx.com/document/affiliates-pro/rates/

    Once you have reviewed the above info, please let us know if further help is needed.

    Kind regards,
    George

Share