Skip to main content

Marketing Consent

Marketing Consent adds a GDPR-compliant opt-in mechanism for collecting marketing permission from users who sign in with Google. Essential for email marketing compliance in the EU and other regulated regions.

PRO Feature

Marketing Consent is a PRO feature. Upgrade to PRO to unlock this functionality.

Under GDPR and similar laws:

  • Marketing requires explicit consent
  • Consent must be freely given
  • Pre-checked boxes are not valid
  • Must be easy to withdraw

Google Sign-In Context

Google sign-in provides:

  • Email address
  • Profile information

But does NOT provide:

  • Marketing consent
  • Newsletter opt-in
  • Permission to email promotions

How It Works

User signs in with Google

Marketing consent UI appears

User opts in or declines

Opted in → Subscribe to email list

Declined → No subscription

Consent status recorded

Checkbox Mode

Checkbox appears during/after sign-in:

☐ I want to receive updates and offers via email
  • User must check to opt in
  • Unchecked = no consent
  • Clear and explicit

Banner appears after sign-in:

Marketing Consent Banner

┌────────────────────────────────────────┐
│ 📧 Stay in the loop! │
│ │
│ Get exclusive offers and updates. │
│ │
│ [Yes, subscribe] [No thanks] │
└────────────────────────────────────────┘

Popup modal for higher visibility:

Marketing Consent Popup

┌────────────────────────────────────────┐
│ Newsletter │
│ │
│ Would you like to receive our │
│ newsletter with exclusive offers? │
│ │
│ [Subscribe] [Maybe later] │
└────────────────────────────────────────┘

Configuration

  1. Go to Settings > OneTap Login
  2. Click Users tab (or Integrations)
  3. Enable Require marketing consent
  4. Configure UI options
  5. Save Changes

Marketing Consent Settings

Settings Options

SettingDescription
Enable consentToggle feature on/off
Consent UICheckbox, banner, or modal
Consent textMessage shown to users
Link to privacyInclude privacy policy link
Remember declinedDon't ask again if declined

Data Stored

When user consents:

Meta KeyValue
_onetap_marketing_consentyes/no
_onetap_consent_timestampISO 8601 date
_onetap_consent_ipIP address
_onetap_consent_methodcheckbox/banner/modal

Audit Trail

For GDPR compliance, record:

  • When consent given
  • How consent given
  • What they consented to
  • Version of consent text

In user profile:

  1. Go to Users > [User]
  2. Scroll to "Marketing Consent"
  3. View consent status and history

Email Marketing Integration

Automatic Subscription

With consent:

User consents → Subscribed to email list

Without consent:

User declines → Not subscribed

Provider Flow

User signs in with Google

Consent UI shown

User consents

OneTap subscribes to ESP

Double opt-in email sent (if enabled)

See Email Marketing for provider setup.

Default

I agree to receive marketing emails and promotions.
You can unsubscribe at any time.

Detailed

I would like to receive:
• Exclusive offers and discounts
• New product announcements
• Tips and helpful content

You can unsubscribe anytime via the link in our emails.
View our Privacy Policy.

Minimal

Subscribe to our newsletter

With Frequency

Get our weekly newsletter with deals and updates.
Unsubscribe anytime.

GDPR Requirements

Under GDPR, consent must be:

RequirementImplementation
Freely givenClear decline option
SpecificStates what you'll send
InformedLinks to privacy policy
UnambiguousActive action required

Not Valid

Avoid these:

  • Pre-checked checkboxes ❌
  • Bundled consent ❌
  • Hidden decline option ❌
  • Vague purpose ❌

Withdrawal

Users must be able to:

  • Unsubscribe from emails
  • Request consent revocation
  • Have records deleted

Hooks for Developers

add_action('onetap_marketing_consent_given', function($user_id, $consent_data) {
// Subscribe to additional services
// Update CRM
// Trigger automation
}, 10, 2);
add_action('onetap_marketing_consent_declined', function($user_id) {
// Log decline
// Potentially show alternative
}, 10, 1);
add_filter('onetap_consent_ui_content', function($content) {
$content['heading'] = 'Stay Connected';
$content['message'] = 'Get 10% off when you subscribe!';
return $content;
});
add_filter('onetap_require_marketing_consent', function($require, $user_id) {
// Don't require for returning customers
$order_count = wc_get_customer_order_count($user_id);
if ($order_count > 0) {
return false;
}
return $require;
}, 10, 2);

MailChimp

Consent status can map to:

  • Subscription status
  • Marketing permissions
  • GDPR fields

Other Providers

Similar mappings available for:

  • MailerLite
  • Brevo
  • Klaviyo
  • GetResponse

Test Scenarios

  1. New user consents: Should subscribe to list
  2. New user declines: Should NOT subscribe
  3. Returning user: May or may not show prompt
  4. Consent then login again: Should not re-ask

Verification

  1. Create test registration
  2. Consent or decline
  3. Check user meta for consent status
  4. Check ESP for subscription status

Troubleshooting

Causes:

  1. Feature disabled
  2. User already has consent status
  3. JavaScript error
  4. Theme conflict

Solutions:

  1. Enable in settings
  2. Test with new user
  3. Check console
  4. Test with default theme

Causes:

  1. Form submission error
  2. AJAX failure
  3. Database issue

Solutions:

  1. Check network requests
  2. Review error logs
  3. Check database connectivity

Causes:

  1. Consent feature disabled
  2. Different subscription path
  3. Plugin conflict

Solutions:

  1. Verify consent is enabled
  2. Check all subscription triggers
  3. Audit email marketing settings

Privacy Compliance

Data Export

Include consent data in GDPR exports:

add_filter('wp_privacy_personal_data_exporters', function($exporters) {
$exporters['onetap-consent'] = [
'exporter_friendly_name' => 'OneTap Marketing Consent',
'callback' => 'onetap_export_consent_data',
];
return $exporters;
});

Data Erasure

Delete consent data on erasure request:

add_filter('wp_privacy_personal_data_erasers', function($erasers) {
$erasers['onetap-consent'] = [
'eraser_friendly_name' => 'OneTap Marketing Consent',
'callback' => 'onetap_erase_consent_data',
];
return $erasers;
});

Best Practices

Do's

  • Clear consent language
  • Easy decline option
  • Honor unsubscribes
  • Maintain audit trail
  • Link to privacy policy

Don'ts

  • Pre-check consent
  • Hide decline option
  • Bundle consent with ToS
  • Use vague language
  • Ignore consent status

Next Steps