承接 swvjeff/laravel-analytics 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

swvjeff/laravel-analytics

Composer 安装命令:

composer require swvjeff/laravel-analytics

包简介

A simple package that allows you to define multiple Google Analytics tracking IDs for your website

README 文档

README

Latest Version MIT Licensed

A simple package that allows you to define multiple Google Analytics tracking IDs for your website

Installation

This package can be installed using Composer:

composer require swvjeff/laravel-analytics

Add your primary Analytics Tracking ID to your .env file

ANALYTICS_TRACKING_ID="UA-XXXXXXX-X"

If you want to add multiple tracking IDs, you can publish the config file of this package with the following command and hard-code the tracking IDs into the secondary_tracking_ids array:

php artisan vendor:publish --provider="Swvjeff\Analytics\AnalyticsServiceProvider"

The following config file will be published in config/analytics.php

return [
    'tracking_id' => env('ANALYTICS_TRACKING_ID'),

    'secondary_tracking_ids' => []
];

Additionally, you can add tracking IDs programmatically by calling \Analytics::addTrackingId('UA-XXXXXXX-X').

Example

Save your primary tracking ID to your .env file, the package will automatically detect it

ANALYTICS_TRACKING_ID="UA-9999999-1"

Add any additional tracking IDs to

use Analytics;

// Add any additional GA tracking IDs programmatically
Analytics::addTrackingId('UA-9999999-2');
Analytics::addTrackingId('UA-9999999-3');

Render your Analytics tracking script

<!DOCTYPE html>
<html>
<head>
    {!! Analytics::render() !!}
</head>

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email jeff@selectwv.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固