Class: VendorUser
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- VendorUser
- Defined in:
- app/models/vendor_user.rb
Overview
Schema Information
Table name: vendor_users
id :bigint not null, primary key
rwg_token :string(191) # Google Actions Center conversion tracking token
vendor_user_email :string(191)
vendor_user_name :string(255)
vendor_user_phone :string(191)
created_at :datetime not null
updated_at :datetime not null
external_user_id :string(191)
vendor_id :integer
Indexes
index_vendor_users_on_rwg_token (rwg_token)
index_vendor_users_on_vendor_id_and_external_user_id (vendor_id,external_user_id)
index_vendor_users_on_vendor_id_and_vendor_user_email (vendor_id,vendor_user_email)
index_vendor_users_on_vendor_id_and_vendor_user_phone (vendor_id,vendor_user_phone)
rwg_token Column Documentation
The rwg_token (Google Actions Center conversion tracking token) is used for tracking conversions initiated by Google through Action Center integrations.
Purpose:
-
Tracks user conversions that originated from Google referrals (Maps, Search, etc.)
-
Enables attribution tracking for up to 30 days from initial Google referral
-
Contains encoded metadata about the action link and merchant information
-
Required for Google Actions Center conversion tracking compliance
Lifecycle:
-
Token is captured when user visits booking page via Google action_link with rwg_token parameter
-
Stored at user-level in database for 30-day attribution window
-
Used to send conversion events to Google when user completes a booking
-
Refreshed/replaced when user receives new Google referral to same merchant
Integration:
-
Parsed from URL query parameter: ?rwg_token=<encoded_token_value>
-
Sent to Google conversion endpoint on successful booking completion
-
Required fields in conversion payload: conversion_partner_id, rwg_token, merchant_changed
Reference: developers.google.com/actions-center/guides/conversion-tracking