GoogleAnalyticsManager
class GoogleAnalyticsManager implements BasicEntityManagerInterface
Class GoogleAnalyticsManager is injected as empire_google_analytics_plugin.google_analytics_manager service. GoogleAnalyticsManager handles the logic for managed entity.
Constants
| UPLOAD_DIR |
|
| UPLOAD_DIR_PATH |
|
| CONFIG_FILE_NAME |
|
| VIEW_CACHE_KEY |
|
| TRACKING_CACHE_KEY |
|
Methods
GoogleAnalyticsManager constructor.
Get product information with additional params (Brand name and Category Name concat)
Create impressions response
Get order with custom information - used to send data to Google Analytics
Get google analytics token
Check if configuration file exists
Get google analytics config
Save google analytics configuration
Remove google analytics configuration from database and file
Re-cache google analytics configuration
Set google analytics params to cache
Get data from cache by key
Details
at line 67
__construct(ProductManager $productManager, OrderManager $orderManager, GoogleAnalyticsConfigRepository $repository, Redis $client)
GoogleAnalyticsManager constructor.
at line 81
array
getProductsFromList(array $array)
Get product information with additional params (Brand name and Category Name concat)
at line 93
array
createImpressionsResponse(array $data, array $dbData)
Create impressions response
at line 113
array
getOrderForGoogleAnalytics(int $orderId)
Get order with custom information - used to send data to Google Analytics
at line 122
mixed
getGoogleAnalyticsToken()
Get google analytics token
at line 145
mixed
getConfigFile()
Check if configuration file exists
at line 158
GoogleAnalyticsConfig|boolean
getConfig()
Get google analytics config
at line 171
bool
saveConfig(string $trackingId, string $viewId, array $fileArray)
Save google analytics configuration
at line 202
bool
removeConfig()
Remove google analytics configuration from database and file
at line 217
GoogleAnalyticsConfig
reCacheData()
Re-cache google analytics configuration
at line 233
cacheData(string $trackingId, string $viewId)
Set google analytics params to cache
at line 245
bool
getCacheData(string $key)
Get data from cache by key