Use TrinityWiz to analyze social networking data, based on a data set. Prof. Assoc. Dr. Nevila Albert Tollkuçi Dorela Karaj Kevin Kostreci Baci Pragmatic Analytics Faculty of Economics Computer Science Faculty of Economy, Tirane, Albania Tirane, Albania American University in Bulgaria University of Tirana nevila.baci@unitir.edu.al albert.tollkuci@gmail.com dorela@hotmail.co.uk kevin.kostreci@gmail.com Abstract interactors, what campaign should be stopped as they have low effectiveness, and so on. The most difficult response to get is how causal data E-commerce is an ever-growing industry, and analysis and data analysis were done using the UCB (upper social media have become one of the go-to outlets limit trust algorithm). The analysis results confirm the for reaching the highest number of customers. The importance of the analysis process by using different staggering number of users that accesses these algorithms to improve or enhance return on investment platforms on a day-to-day basis makes them an (ROI). ideal target for the marketing department of any A diversity of social networks is a very powerful tool to growth-oriented company. With such a great connect businesses to their relevant audience. But posting premise, it comes natural that companies will find without realizing who the audience is or what kind of it wise to invest their resources into the myriad of content the audience prefers is just like running a dark, social networks that populate the internet, but they unmanageable, dangerous vehicle in a blurry road and can can’t mindlessly throw their money without turn into costs for businesses. Fortunately Facebook has a analyzing the behavior of their audience. Here is powerful and free tool, Facebook Insights which allows where TrinityWiz comes into play. every business to easily measure the performance of their business site. Relevant views, achievements, likes etc. No matter what your goals are, Facebook Analytics will help raise brand awareness by helping you understand what your 1. The general problem and the focus of the audience is most committed to, how to communicate with study customers and how to interact with your site. Once you factor in the human component of the audience the matter gets more complex. Over time, we see that the dominance of social networks The audience’s age, gender, and even physical location play will continue to grow even more. In all global markets a role into the effectiveness that advertisements will have consumers are spending more time on social networks on them. Deriving lessons from past campaigns is a must every year. Aside from communicating with friends and for any brand that wants to allocate its investments in the relatives, a new phenomenon in the industry is the best way possible to maximize profit and reach the emergence of digital consumers who are engaging in social audience that is the most interested in what they have to networks, browsing different products, interacting with offer. Messenger bots, and watching different videos. TrinityWiz, the subject of this study, is a tool for analyzing Given that consumers have different social behaviors, account placements on social networks. It achieves companies are even more attracted to the study of these significantly improved structured data analysis by behaviors for evaluating different marketing strategies. generating real-time and scheduled reports. It can also send To sketch a better advertisement on Facebook, we need different notifications or alerts according to user every finding or information we receive so as to make it as preferences. distinct and different from the rest. As each company We have employed a set of Python modules to accomplish makes marketing research for their own account then they the above, which provide better evaluation of our data can use these search analyzes for possible marketing [Kan10]. This article will examine reading and analyzing selection. More categorically we list the following: social networking data from Facebook via the application programming interface (API). Once the database is updated • Identify the customer key point. If competing with the data obtained, we can perform various analyzes of companies are losing services, they support wrong values. the processing of this data that was implemented in Python. Then these are some factors that need to be considered to During the processing, we come to the type of campaign address the service offered by your company and give the which generates more clicks or benefits for the company, right context of an advertising campaign on Facebook. what age group or which devices are the most focused • Hypothetical solution to the key point: The solution that the company provides for customer problems is the content of their ads. It is important that the solution is as specific as access to the virtual world, as we know that virtual users possible since it needs to be visualized. are a major focus group in the world. All positive or • Appropriate Identification of Facebook Advertising negative ratings made by users can be collected and Strategy: There are many tools that offer many different analyzed in real time, which enables companies to react strategies for better advertising. Such strategies include faster to new tendencies and potential risks. surveys of what competitive advertising companies look To understand user activity in social media, the latter like, how your ads may be different, etc. usually provide relevant analysis tools. Usually these only • Turn the above problem into a solution for your allow data analysis for the company's account. But what is advertising strategy. It should be as clear and visible as even more necessary is an analysis that compares possible to the consumer. performance with the company's competitiveness and standard. Over the last year we have noticed a long list of social There are several ways in which social media analysis can media innovation formats, a growing mobile video, and the be used, depending on what the company wants to follow use of Artificial Intelligence (AI) in messaging bots. and appreciate. Some of the most common ways that Companies are interested in these innovations but are also businesses and organizations use are: under pressure to justify the ROI of existing social media investments. •Monitoring and analyzing online reputation The purpose of TrinityWiz is to offer different companies, •Analyzing and optimizing the performance of social new data, best practices and opportunities for companies' networks (such as marketing campaigns) investments in social networks like Facebook. •Identifying key customer points 2.1.2 Which indicators should be evaluated 2 General overview Different platforms are able to track many networks including Twitter, Facebook, Instagram, YouTube, 2.1 What the analysis of social networking data is and Google+, LinkedIn, Viemo, Weibo, etc. how it works Generally these platforms have tools included in the social Social networking data analysis refers to the practice of network. Analysis of social media differs from the choice using a massive amount of data and indicators to analyze of social media analysis method of following all social what is happening in ads placed on social networks. In most networks at the same time. It is instead more efficient and cases the analysis of social networks covers the analysis of will yield valuable results. Since I'm referring to the social online media channels such as news, blogs and forums. But network Facebook, let's see what Facebook Analytics it’s not only that. Lately it is extending broadly to analyzing offers. Facebook page analysis only shows you the user behavior for business marketing. performance of your posts and followers behavior Initially, what is needed to analyze this data is the selection [Wym11]. Then how will you be able to determine: of a social network. It can be selected by a network with a • What is the best time to post? high number of users or some networks together. We will • What is the best weekday to post? then collect all information that can be obtained from a • What is the most widespread type of content? person who has an account in the relevant social network • A review of Facebook Insights. using the API provided by the social network. You can also view a general overview of your site that Once the information has been collected, the next step is its covers your audience and posting performance. Data can be organization. Information can be categorized using a retrieved for different time periods, ranging from one day to variety of different filters such as demographics, language, the next seven days or the last 28 days. content, age groups, and so on [CGK10]. Here too, we can You can also reach high-level statistics by identifying the analyze the information we receive by evaluating what demographics of followers, including location, language, content people like, the age group that is drawn more, etc. gender, and so on. For posts you can see how the page was Once the information is collected and analyzed then we can viewed each day and in what part of the day there was a display it visually using different platforms for presentation higher value. of the data. 2.2 Integrating Facebook Profile into TrinityWiz 2.1.1 Why and how social network data analysis should 2.2.1 How to Add An Advertising Account to be used TrinityWiz The first thing you should do is allow TrinityWiz to add Without an accurate analysis of social media advertising, it your Facebook accounts. TrinityWiz allows you to manage is difficult to understand what happens to online products your advertising accounts for several different Facebook or services, and this makes the performance of marketing accounts. Once logged into TrinityWiz, you can add harder to follow. Analyzing this data gives companies more adaccounts by clicking the "Add an Account" button as business) will appear on the list. From there you can search shown below: all the information about the advertising campaigns. 2.2.2 What are the divisions and how to apply them? Divisions are categorizations of knowledge that behave according to the following groups: The main categories are: 1. Category by Time: Useful to see how your ad operates at different times of the day. You can choose to view the classified delivery every hour, day, month, in your time zone of your advertising account or in the viewer time zone. Figure 1: Illustration of adding an "Add an account" 2. Category by Distribution: It will help you understand the way the distribution is made according to age, gender, Then, if you do not enter Facebook, you will be asked to region, equipment, etc. login and you will receive a prompt requesting your 3. Category by Actions: It is useful to analyze the various Facebook account to allow TrinityWiz to have access to actions that users have received in advertising, get your name, profile, and email address. action_destination, action_device, action_reaction, action_target_id, action_type, etc. data. TrinityWiz is focused on divisions by distribution and time: Category by distribution • Age - enables viewing and analyzing data by the age of people who have watched / clicked your ad. • Region - View your data from the region (like the state or province) where people are living or where they see your ads, depending on how you place your location. • Device - enables viewing and analyzing the data of the device that has accessed the advertisement. Figure 2: Illustrating the permissions that the app requires • Gender - Allows viewing and analyzing data by gender. • Gender and Age - Combining data by sex and age. Clicking "Continue" will display another prompt to allow TrinityWiz access to the ads that are required to read the To see your distributions, you need to go to your ad account details. If you click on "Choose what you will account or the relevant campaign. allow", you will see the following request to read the There is shown that distributions are divided into five tabs: permissions that are required: age, sex, device, country, and gender and age combination. For each type of breakdown, impressions, CTRs, Clicks, CPPs, CPMs, CPCs, and associated costs for each grouping appear. Depending on your goals, you will find some of the available options more useful than others. Below are some pictures that show the type of data that will be displayed for different segments: Figure 3: More detailed illustration of the permissions required by the application The only permission required is to allow TrinityWiz access to ads and advertising statistics. TrinityWiz will automatically retrieve information on your advertising reports for the accounts you are accessing. Once you click OK, you will be returned to TrinityWiz and all advertising accounts that you have permission to (personal and Figure 4: Graphic representation of indicators grouped by age The largest age range for this ad's impressions is 25-34, 119,495 impressions / week, which accounts for 34.5% of all impressions. 2.2.3 View results of your Facebook Ads in TrinityWiz For every ad you run on Facebook, you can view insights on the ad’s performance in the TrinityWiz App. This data includes:  The number of people who click on your ad Figure 5: Illustration of all campaigns for an ad account  The amount you spend on your ad  How many impressions your ad has A popup appears and you can see the details all the time for  Frequency and CTR of your ads a campaign. Here are the metrics that most Facebook ad campaign managers will want to keep an eye on: Impressions: The impressions metric tells you how many times your ad was viewed. If you are running a brand awareness campaign, you may want to keep an eye on this metric as it tells you what your brand name exposure level is. Frequency: The frequency metric tells you how many times your ad was viewed, on average, by a specific individual. Clicks: The clicks metric is very important since it represents the number of times someone has clicked on your ad. Click-Through Rates: The click-through rate (CTR) metric tells you the percentage of people who click an ad out of all the people who saw the ad. Cost Per Click / Cost Per Impression: The cost per click and cost per impression metrics are pretty straight forward. Cost per click, or CPC, shows how much you’re paying Figure 6: Illustration of lifetime data for an campaign when someone clicks your ad. The cost per impression, or CPM, shows how much you’re paying per 1,000 views. Click all (-) icons to hide the detailed features. You can also Cost Per Conversion: The cost per conversion metric tells download the campaign details to an Excel file, just click you how much you’re paying for each lead or sale. on the Download Excel button. To see the details of daily updates for each of your ad objects, just click on the name of each of the ad objects and 2.2.4 Introducing TrinityWiz you will see the graphs and the value tables. Below is the weekly data for a specific campaign: We manage all of these metrics with our TrinityWiz app, including lifetime and daily data, so you can start tracking and see the results. If you want to see lifetime data of your ad campaign, just click in the right button ‘Details’ near your ad campaign row as in the table below: Figure 7: The visual appearance of the indicators compared to those a week ago These are the indicator data for your ad object compared to the data of the previous week. In the calendar you can choose your period for about a week, a month or today, yesterday, but you can also choose your time segment as desired. TrinityWiz shows all of these indicators in your favorite range. The graph displays the data for the selected date UCB assigns the following value for each arm i at any time range. t [Agr95] : Choose each of the 7 indicators: CPP, CPM, Impressions, CTR, CPC, Cost, Clicks, and you can see the results. The CTR average for the current week appears in the summary of the information summary and we compare it to the average of a week ago. It's the same for CPP, CPM, and CPC. Meanwhile Cost, Impressions, and Clicks are calculated for the current week and compared to the amount of the previous week. You can see information in the ad group or ad level, further going into those from a specific campaign. The following figure shows the number of likes: Implementation Taking into consideration 6 different ads and data points of only 5k user actions, we below see that with random Figure 8: Conversion per like selection different ads are selected almost uniformly and the click rate is approximately 19.57% [Kan10]. Below are shown all the above mentioned indicators, with lifetime data. Figure 9: Lifetime data 2.3 The Upper Confidence Bounds (UCB) algorithm Graph 1. Distribution of ads. How to Use in Analyzing Advertising: The UCB algorithm mechanism is simple. In every round, Now below we will see if the UCB algorithm improves the we simply draw the arm with a higher empirical value up to click rate. a point and some terms that are inversely proportional to the number of times the arm has moved [LR85]. More formally, we define ni,t which is the number of times that arm i has played up to t time. Determine rt ∈ [0, 1] to be the value we observe in time t. Let It be ∈ {1. . . N} will be the choice of wing at time t [ACF02]. Then the empirical value of the wing value at time t is: [Wym11] Cliff Wymbs ‘Digital Marketing’, The Time for a New “Academic Major” Has Arrived, 2011. [CGK10] Yunjae Cheong, Federico de Gregorio, Kihan Kim ‘Journal of Advertising Reaseach’ The Power of Reach and Frequency in the Age of Digital Advertising. Vol. 4, pg. 403-415, 2010. [Kan10] Akash Kandpal An Introduction to Data Analysis with Pandas, 2010. Graph 2. Distribution of ads using UCB. By using the Upper Confidence Bounds (UCB) algorithm we get the click rate of 21.35%. As we can see from the graph, second Ad has the highest probability of getting clicked [KR95]. This algorithm would also minimize the cost of the company investing in the right advertisement Conclusions and recommendations In this paper, an overview of the data analysis was presented, with an explanation on the necessity for companies to use sourcing tools to analyze their ads. The latter shows how advertising is helping businesses achieve certain goals. Successful results for an ad should be directly attributed to the time invested in the strategy, creation and optimization. If done wrong, it will bring nothing but loss for the business. But if done properly using a tool analyzer like TrinityWiz, the business will have more opportunities to learn about the audience, campaign, sales of products and much more. With the results of the analysis you can make more accurate decisions to create the right campaigns by improving the results. By knowing the number of people who click your ad, the impression it leaves, frequency and CTR, you can estimate your costs. Also, the analysis offered by the UCB algorithm will be able to do so best of all, without losing much time by taking the calculations on paper. What would be even more interesting for many companies would be the implementation of more different algorithms to further evaluate what would approach as much as possible an optimal return. References [LR85] Tzu L. Lai dhe Herbert Robbins. Asymptotically efficient adaptive allocation rules, 1985. [Agr95] Rajeev Agrawal. Sample mean based index policies with O(logn)O(log⁡n) regret for the multi-armed bandit problem, 1995. [KR95] Michael N Katehakis dhe Herbert Robbins. Sequential choice from several populations, 1995 [ACF02] Peter Auer, Nicolo Cesa-Bianchi, dhe Paul Fischer. Finite-time analysis of the multiarmed bandit problem, 2002.