We've moved discussions to Discord

Email marketing Convertkit integration

Borja Soler
I have seen the docs about convertkit integration. And now I have created an account in convertkit and added the API keys.

Now I would like to know where should I write the Jumpstart convertkit code in my code. I have seen this line in the Docs:

Jumpstart::Clients.convertkit.add_subscriber_to_tag(tag_id, email, options={})

but I don't know where I have to put this line. For example If I want to add a user to the tag "usuario" after someone registers in the app. 

Thank you! 🙂
Chris Oliver
You'd put that line wherever in your app you want to add them to Convertkit. Sometimes you want to do this on registration. Sometimes you want to do that when they subscribe to your product, or fill out a form for the newsletter in the footer. It's entirely up to you.

If you want to do it after registration, you can either do it `after_create` on the User model or override the Devise registrations controller create action to do it after successful creation.
Borja Soler
Hi, sorry for checking this so late.

I have tried adding this:
Jumpstart::Clients.convertkit.add_subscriber_to_tag(1111111, email, options={})

Being 1111111 mi tag_id in convertkit 

I tried adding it to user_accounts.rb like this:
# Regular users should get their account created immediately    
after_create :create_default_account, -> {Jumpstart::Clients.convertkit.add_subscriber_to_tag(1111111, email, options={})}    after_update :sync_personal_account_name, if: -> { Jumpstart.config.personal_accounts }

But doesn't work as says: undefined method `add_subscriber_to_tag' for nil:NilClass

Borja Soler
anyone has added convertkit using jumpstart?
Corinn Pope
I had the same error. I had installed the convert kit gem on my own, so I uninstalled it. Then I went to the integrations page in Jumpstart config, checked the box, clicked save, and the error went away. 
You’re not receiving notifications from this thread.