Documentation ¶
Index ¶
- type ActionSource
- type Content
- type Contents
- type CustomerInformation
- func (ci CustomerInformation) WithCity(city string) CustomerInformation
- func (ci CustomerInformation) WithClientIPAddress(clientIPAddress string) CustomerInformation
- func (ci CustomerInformation) WithClientUserAgent(clientUserAgent string) CustomerInformation
- func (ci CustomerInformation) WithCountry(country string) CustomerInformation
- func (ci CustomerInformation) WithEmail(email string) CustomerInformation
- func (ci CustomerInformation) WithFbc(fbc string) CustomerInformation
- func (ci CustomerInformation) WithFbp(fbp string) CustomerInformation
- func (ci CustomerInformation) WithFirstName(first string) CustomerInformation
- func (ci CustomerInformation) WithHashedEmail(hashedEmail string) CustomerInformation
- func (ci CustomerInformation) WithHashedPhoneNumber(hashedPhoneNumber string) CustomerInformation
- func (ci CustomerInformation) WithLastName(last string) CustomerInformation
- func (ci CustomerInformation) WithPhoneNumber(email string) CustomerInformation
- func (ci CustomerInformation) WithState(state string) CustomerInformation
- func (ci CustomerInformation) WithZip(zip string) CustomerInformation
- type ServerEvent
- type ServerEvents
- type UnixTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionSource ¶
type ActionSource string
const ( Email ActionSource = "email" Website ActionSource = "website" App ActionSource = "app" PhoneCall ActionSource = "phone_call" Chat ActionSource = "chat" PhysicalStore ActionSource = "physical_store" SystemGenerated ActionSource = "system_generated" BusinessMessaging ActionSource = "business_messsaging" Other ActionSource = "other" )
type Content ¶
type Content struct { ID string `json:"id,omitempty"` Quantity int `json:"quantity,omitempty"` DeliveryCategory string `json:"delivery_category,omitempty"` }
Contents entity is a part of standart parameters. A list of JSON objects that contain the product IDs associated with the event plus information about the products
type Contents ¶
type Contents []Content
func NewContents ¶
func NewContents() Contents
func (Contents) AddContent ¶
type CustomerInformation ¶
type CustomerInformation struct { Email []string `json:"em,omitempty"` PhoneNumber []string `json:"ph,omitempty"` FirstName string `json:"fn,omitempty"` LastName string `json:"ln,omitempty"` City string `json:"ct,omitempty"` State string `json:"st,omitempty"` Zip string `json:"zp,omitempty"` Country string `json:"country,omitempty"` ClientIPAddress string `json:"client_ip_address,omitempty"` ClientUserAgent string `json:"client_user_agent,omitempty"` Fbc string `json:"fbc,omitempty"` Fbp string `json:"fbp,omitempty"` }
CutomerInfromation entity https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters
func NewCustomerInformation ¶
func NewCustomerInformation() CustomerInformation
func (CustomerInformation) WithCity ¶
func (ci CustomerInformation) WithCity(city string) CustomerInformation
func (CustomerInformation) WithClientIPAddress ¶
func (ci CustomerInformation) WithClientIPAddress(clientIPAddress string) CustomerInformation
func (CustomerInformation) WithClientUserAgent ¶
func (ci CustomerInformation) WithClientUserAgent(clientUserAgent string) CustomerInformation
func (CustomerInformation) WithCountry ¶
func (ci CustomerInformation) WithCountry(country string) CustomerInformation
func (CustomerInformation) WithEmail ¶
func (ci CustomerInformation) WithEmail(email string) CustomerInformation
Adds non-hashed email to the struct for it to be hashed.
func (CustomerInformation) WithFbc ¶
func (ci CustomerInformation) WithFbc(fbc string) CustomerInformation
func (CustomerInformation) WithFbp ¶
func (ci CustomerInformation) WithFbp(fbp string) CustomerInformation
func (CustomerInformation) WithFirstName ¶
func (ci CustomerInformation) WithFirstName(first string) CustomerInformation
func (CustomerInformation) WithHashedEmail ¶
func (ci CustomerInformation) WithHashedEmail(hashedEmail string) CustomerInformation
Adds already hashed email to the struct
func (CustomerInformation) WithHashedPhoneNumber ¶
func (ci CustomerInformation) WithHashedPhoneNumber(hashedPhoneNumber string) CustomerInformation
Adds already hashed email to the struct
func (CustomerInformation) WithLastName ¶
func (ci CustomerInformation) WithLastName(last string) CustomerInformation
func (CustomerInformation) WithPhoneNumber ¶
func (ci CustomerInformation) WithPhoneNumber(email string) CustomerInformation
Adds non-hashed phoneNumber to the struct for it to be hashed.
func (CustomerInformation) WithState ¶
func (ci CustomerInformation) WithState(state string) CustomerInformation
func (CustomerInformation) WithZip ¶
func (ci CustomerInformation) WithZip(zip string) CustomerInformation
type ServerEvent ¶
type ServerEvent struct { EventName string `json:"event_name"` EventID string `json:"event_id"` EventTime UnixTime `json:"event_time"` EventSourceURL string `json:"event_source_url"` ActionSource ActionSource `json:"action_source"` UserData CustomerInformation `json:"user_data,omitempty"` Contents Contents `json:"contents,omitempty"` // CustomData might represent your cutom struct with any fields. CustomData interface{} `json:"custom_data,omitempty"` }
ServerEvent entity https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/server-event
func NewServerEvent ¶
func NewServerEvent(eventName, eventId string, eventTime UnixTime, actionSource ActionSource) ServerEvent
func (ServerEvent) WithContents ¶
func (e ServerEvent) WithContents(contents Contents) ServerEvent
func (ServerEvent) WithCustomData ¶
func (e ServerEvent) WithCustomData(customData interface{}) ServerEvent
func (ServerEvent) WithEventSourceURL ¶
func (e ServerEvent) WithEventSourceURL(eventSourceURL string) ServerEvent
func (ServerEvent) WithUserData ¶
func (e ServerEvent) WithUserData(customerInfo CustomerInformation) ServerEvent
type ServerEvents ¶
type ServerEvents []ServerEvent
Click to show internal directories.
Click to hide internal directories.