Tút này không mới nhưng sẽ hữu ích cho ae nào mới lọ mọ XF
Step 1: Làm theo hướng dẫn tạo User-ID View mới https://support.google.com/analytics/answer/3123666?hl=en
Step 2: Login Xenforo Admin -> Appearance -> Templates -> tìm template name: google_analytics
Tìm đoạn:
Thêm vào bên dưới
Hết tút, ae check lại kết quả trên GA + view-source XF của ae nhé
Reference
Step 1: Làm theo hướng dẫn tạo User-ID View mới https://support.google.com/analytics/answer/3123666?hl=en
Step 2: Login Xenforo Admin -> Appearance -> Templates -> tìm template name: google_analytics
Tìm đoạn:
Code:
<xf:if is="$xf.options.googleAnalyticsAnonymize"> 'anonymize_ip': true,
</xf:if>
Code:
<xf:if is="{$xf.visitor.user_id}"> 'user_id' : '{$xf.visitor.username}',
</xf:if>
Reference
- https://support.google.com/analytics/answer/3123666?hl=en
- https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id
- https://xenforo.com/community/resources/conditional-statements-for-xenforo-2.5795/
See Also:
- Web bị hack index tiếng Nhật, redirect khi truy cập từ Google
- Tín hiệu mạng xã hội không phải yếu tố trực tiếp xếp hạng
- Hướng dẫn thêm Analytics mà không ảnh hưởng tốc độ tải trang
- Test Redirect 301 SEO cho list từ khóa Best Xbox One Headsets
- [Share + Download] Flatsome
- Plugin WordPress Comparison Tables dành cho Amazon Affiliate hỗ trợ AMP
- [Video] AMP for WordPress: Cài đặt, config giao diện trên mobile
- Đây không phải là những yếu tố xếp hạng trực tiếp của Google, bạn nên biết?
- Nhật ký SEO: Best CBD Oil cho WikiCBD.org (English - United States)
- Oxygen Builder Review - Đánh giá plugin Page Builder của WordPress?