001/* 002 * Copyright 2023 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.web.analytics; 017 018import org.ametys.runtime.i18n.I18nizableText; 019import org.ametys.web.repository.site.Site; 020 021/** 022 * Web analytics provider interface 023 */ 024public interface WebAnalyticsProvider 025{ 026 /** 027 * Get the id of the provider 028 * @return the id 029 */ 030 public String getId(); 031 032 /** 033 * Get the label of the provider 034 * @return the label 035 */ 036 public I18nizableText getLabel(); 037 038 /** 039 * Get the event image URI 040 * @param site the site 041 * @param category the event category 042 * @param action the event action 043 * @param label the event label 044 * @param value the event value 045 * @param usePlaceholderTokens <code>true</code> to use placeholder tokens in the URI 046 * @return the event image URI 047 */ 048 public String getEventImageUri(Site site, String category, String action, String label, int value, boolean usePlaceholderTokens); 049 050 /** 051 * Get the event link campaign params 052 * @param site the site 053 * @param campaign the event campaign 054 * @param medium the event medium 055 * @param source the event source 056 * @return the event link campaign params 057 */ 058 public String getEventLinkCampaignParams(Site site, String campaign, String medium, String source); 059}