• Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Hooks

Namespaces

  • None
  • SIW
    • Admin
    • API
    • Async
    • Batch
    • Compatibility
    • Data
    • Elements
    • Email
    • External
    • Forms
    • Modules
    • Newsletter
    • Page_Builder
    • Plato
    • Widgets
    • WooCommerce
      • Admin
      • Checkout
      • Email
      • Export
      • Frontend
      • Import

Classes

  • Cache_Rebuild
  • Cookie_Notice
  • Google_Analytics
  • Menu_Cart
  • Social_Share
  • Topbar

Class Google_Analytics

Google Analytics integratie

Namespace: SIW\Modules
Copyright: 2019 SIW Internationale Vrijwilligersprojecten
Since: 3.0.0
Located at modules/google-analytics.php

Methods summary

public static
# init( )

Init

Init

protected
# set_property_id( )

Haalt het GA property ID op

Haalt het GA property ID op

protected boolean
# tracking_enabled( )

Geeft aan of tracking ingeschakeld moet worden

Geeft aan of tracking ingeschakeld moet worden

Returns

boolean
public
# enqueue_scripts( )

Voegt scripts toe

Voegt scripts toe

protected string
# generate_snippet( )

Genereert snippet

Genereert snippet

Returns

string
protected array
# generate_ecommerce_script( )

Genereert Enhanced Ecommerce script

Genereert Enhanced Ecommerce script

Returns

array
protected array
# get_product_data( WC_Product $product, WC_Product_Variation $variation = null )

Geeft productdata voor GA terug

Geeft productdata voor GA terug

Parameters

$product
$variation

Returns

array

Todo

land of partner als brand toevoegen
protected array
# generate_cart_data( )

Genereert cart data (om verwijderen uit cart te tracken)

Genereert cart data (om verwijderen uit cart te tracken)

Returns

array
public
# track_add_to_cart( string $cart_item_key, integer $product_id, integer $quantity, integer $variation_id, array $variation, array $cart_item_data )

Track toevoegen aan cart

Track toevoegen aan cart

Parameters

$cart_item_key
$product_id
$quantity
$variation_id
$variation
$cart_item_data
public string
# add_variation_id_to_cart_item_remove_link( string $link, string $cart_item_key )

Voegt variatie-id toe aan remove from cart link

Voegt variatie-id toe aan remove from cart link

Parameters

$link
$cart_item_key

Returns

string
protected
# add_script_to_session( array $script )

Sla script op in sessie om na redirect te kunnen tonen

Sla script op in sessie om na redirect te kunnen tonen

Parameters

$script
protected array
# get_script_from_session( )

Haal opgeslagen script uit WC-sessie

Haal opgeslagen script uit WC-sessie

Returns

array
public array
# add_ga_url( array $urls )

Voegt GA-domein aan array toe t.b.v. filters

Voegt GA-domein aan array toe t.b.v. filters

  • Uitsluiten van minification
  • Uitsluiten van defer
  • Resource hints (dns-prefetch + preconnect)

Parameters

$urls

Returns

array
public array
# set_excluded_inline_js_content( array $content )

Sluit inline JS voor Ecommerce uit van combineren

Sluit inline JS voor Ecommerce uit van combineren

Parameters

$content

Returns

array

Constants summary

string SESSION_SCRIPT_KEY

Key voor WooCommerce-sessie

Key voor WooCommerce-sessie

# 'siw_enhanced_ecommerce_script'

Properties summary

protected string $property_id

Google Analytics property ID

Google Analytics property ID

#
protected array $tracker_settings

Instellingen voor tracker

Instellingen voor tracker

# [ 'anonymizeIp' => true, 'forceSSL' => true, ]
SIW API documentation generated by ApiGen