Solved

Check if user has an account in WooCommerce


Badge

Hi,

I want to show a button to let users open the order in the their account.

The problem is, that we also allow guest orders and not every user has an account in the shop.
In this case I don’t want to show the button because the link would lead to an error page.

Is there any way to check for an user account? I couldn’t find anything like it.

icon

Best answer by David To 6 May 2022, 17:20

View original

6 replies

Userlevel 7
Badge +53

Hey @SimonK,

Good question!

This sounds like a great use case for Klaviyo’s Show/Hide functionality. If you had some way to determine if a profile has a user account with your brand, you can create the show/hide logic to only display this dynamic button to appear for users with an account and hidden from recipients without an account. The most common way this would be accomplished was if a custom profile property was applied to identify users during the account creation process. 

This topic of using the show/hide functionality is a pretty common one in our Community and I’ve included some existing threads below that others have found helpful in accomplishing their goals with the feature:

I hope this helps!

David

Userlevel 6
Badge +25

I second what David is also saying.

If you can add a custom property that updates if a client has an active woo account you're almost done. I know some loyalty tools like stamped do add this to Klaviyo but having a developer (or maybe zapier) could help here.

 

Omar

Badge

Thanks again @Omar 

Unfortunately I’ve no developer with Klaviyo experience at hand. But I will check if there’s a way.

Userlevel 7
Badge +53

Hey @SimonK,

If you’re in search of a developer, I would highly recommend taking a look at our Klaviyo Partner Directory. There, you’ll find a number of accredited Klaviyo Partners - like @Omar! - who can further assist you with your custom setup!

David

 

Would Klaviyo consider adding ‘Created Account’ and ‘Logged in’ as a built in metric via the WooCommerce integration?

Seems those and ‘Left a review’ are three obvious metrics that are missing and shouldn’t need custom API calls coding up.

Is also actually listed in the changelog of the integration - but I can’t see that being tracked? ‘= 1.1 =
* Adding in automatic tracking of users if they log in or post a comment.

Thanks,

Ian.

Userlevel 7
Badge +53

Hey @addedlovely,

I’ll share your feedback with our Product Team to explore what additional metrics can be shared to Klaviyo as part of the default integration!

One reason I could imagine why these type of metrics aren’t natively synced to Klaviyo, but rather require a custom API event to be called would be due to how each site handles these account creation, logging in, and review methods differently. One example of this would be how your store’s account creation page may differ from my store’s account creation page. If Klaviyo did hypothetically have a means to sync an account creation event automatically, this would raise the question of what type of data would be synced as part of this account creation’s metadata; especially with sites that collect additional information. I would also imagine with a “one size fits all” solution, that brands whose account creation page is more intricate and collects more details than what is outside of the supported default would still need to go the custom route. 

To highlight some clarification in the Klaviyo<>Wordpress plugin’s 1.1 changelog pertaining to “automatic tracking of users if they log in or post a comment”, this is in reference to Klaviyo’s web tracking/onsite tracking rather than being tracked via a custom event. Essentially, users who log in will also be cookied via Klaviyo and considered an active profile and would record an active onsite event. 

David

 

Reply