Spaces:
Build error
social media output (#5)
Browse files- Add social media section to display marketing insights and data (367f4e661025fdc904785945464f9f908e48ea3e)
- Add content section to display digital marketing insights and analysis (c812c287cdb47d97a8890a575ec22e250d5960fd)
- Update error message in get_analyst_response for clarity and comment out marketplace data retrieval in output.py (cb73b2fc8052e5e6b3128536baab0e7b95df1d80)
- Add icons to buttons for improved user experience in analyzing_page and home (74ecf43ecace275c9c8e4e7edc68f5014a6034bd)
- Add icons to buttons for improved user experience in home and output pages (be5c2253a812f079ad67c393aa22bc9b86c2df6f)
- Update display_outputs to include client website in the digital marketing audit header (37b4050b7141b68660d913f4acb44aa132e93ea5)
- Enhance digital marketing audit output with additional insights and structured content sections (3445bb28edced3107a2ba66626285fb4330ed731)
- Refactor marketplace data retrieval logic and add conversion activation sections to the digital marketing audit output (67b44b509108882a4fe6bc08b65da429fcb3cacb)
- Update client footprint and snapshot by channel sections to indicate content is to be determined (84627a6915cafce184342e6634df561f779a3f49)
- Enhance button functionality in DigitalFootprintDashboard to use full container width for improved layout (5c823008f609fa7cba64c1d94681eeb9132a4e2d)
- Add separator and success message after analysis completion in run_analysis function (f98533ff087621799ca078a9787abaee09b93a45)
- Add "Go to top" links for improved navigation in display_outputs function (c48a15e2394d238e3c3d05f2c61b3a0102a8c2b9)
- Refactor target market and content analysis sections to retrieve and display data dynamically (213993b741503909031534339014400f1167490c)
Files changed (4)
- helper/data_field.py+1-1
- pages/analyzing_page.py+2-1
- pages/home.py+2-2
- pages/output.py+122-6
20 unmodified lines2122232425262720 unmodified linesif x and "result" in x:return x["result"]else:print(f"No matching document or 'result' field found for data_src: {data_src} in df_response")return None # Return None if no doc or 'result' field foundfinally:if myclient:20 unmodified lines2122232425262720 unmodified linesif x and "result" in x:return x["result"]else:print(f"No matching document or 'result' field found for data_src: {data_src} in df_response. 404")return None # Return None if no doc or 'result' field foundfinally:if myclient:
189 unmodified lines190191192193194195196197198189 unmodified linesmarketplace_thread.join()target_market_thread.join()st.success("🎉 All analyses completed!") # Final success message# --- Display Button After Completion ---if st.button("View Results"):st.switch_page("pages/output.py")# Execute the analysis189 unmodified lines190191192193194195196197198199189 unmodified linesmarketplace_thread.join()target_market_thread.join()st.markdown("---")st.success("🎉 All analyses completed!") # Final success message# --- Display Button After Completion ---if st.button("View Results", icon="📃"):st.switch_page("pages/output.py")# Execute the analysis
45 unmodified lines464748495051525354555657585945 unmodified lineswith col1:self.upload_file_button = st.button("Upload File", st.session_state['analyze'])if self.upload_file_button == True:st.session_state["analyze"] = 'clicked'unhide_button()else:st.session_state["analyze"] = ''self.analyze_button = st.button("Analyze")if self.analyze_button == True:st.switch_page("pages/analyzing_page.py")else:45 unmodified lines464748495051525354555657585945 unmodified lineswith col1:self.upload_file_button = st.button("Sync Data", st.session_state['analyze'], icon="🔄", use_container_width=True)if self.upload_file_button == True:st.session_state["analyze"] = 'clicked'unhide_button()else:st.session_state["analyze"] = ''self.analyze_button = st.button("Analyze", icon="✨", use_container_width=True)if self.analyze_button == True:st.switch_page("pages/analyzing_page.py")else:
114 unmodified lines1151161171181191201211221231241251261271285 unmodified lines1341351361371381391401411421431445 unmodified lines1501511521531541552 unmodified lines1581591601611621631641651664 unmodified lines1711721731741751761 unmodified line1781791801811821831 unmodified line185186187188189190191192114 unmodified linesdef display_outputs():client_name = "RMX Creatives"overview = f"""**{client_name}** is a financial services company based in Auckland, New Zealand, specializing in providing quick and flexible loan solutions for businesses and individuals. Represented by Paul Stone, LoansOne has enlisted ShoreMarketing to perform a deep dive into their digital footprint to have a view of the holistic status of their digital properties and determine how each property can play part in implementing a stronger digital marketing plan.\nThe Digital Marketing Footprint consists of deep-dive research by ShoreMarketing specialists to help the business leaders of LoansOne understand the effectiveness of their existing digital initiatives with the view of giving them an insight to developing a strategy and effectively allocating business resources to digital properties that will give them the best results.\nThis document represents the results of our audit of LoansOne’s digital marketing and management practices. Our audit covered reviews of key digital areas: Website and Tools, PPC/SEM, SEO, Social Media, and Market Places."""st.markdown("# Digital Marketing Audit")st.markdown(f"{client_name}")st.write("")st.write("")st.write("")5 unmodified linesst.markdown("---")st.markdown("### CLIENT FOOTPRINT")st.markdown(f"A")st.markdown("---")st.markdown("### SNAPSHOT BY CHANNEL")st.markdown(f"A")st.markdown("---")st.markdown("## AUDITS PER CHANNEL")5 unmodified lineswebsite_and_tools_data = get_analyst_response("Website and Tools Analyst")write_table(website_and_tools_data)st.markdown("---")st.markdown("### SEARCH ENGINE MARKETING/PPC")2 unmodified linesCurrently, {client_name} has already explored numerous online advertising. Its competitors are also experienced in PPC in multiple platforms. """)# Write SEM Tablesem_data = get_analyst_response("SEM PPC Analyst")write_table(sem_data)st.markdown("---")st.markdown("### SEARCH ENGINE OPTIMIZATION")4 unmodified linesseo_data = get_analyst_response("SEO Analyst")write_table(seo_data)st.markdown("---")# Write On Page Table1 unmodified lineon_page_data = get_analyst_response("On Page Analyst")seo_on_page_table(on_page_data)st.markdown("---")# Write Off Page Table1 unmodified lineon_page_data = get_analyst_response("Off Page Analyst")seo_on_page_table(on_page_data)st.markdown("---")if st.button("Back to Dashboard"):st.switch_page("pages/home.py")display_outputs()114 unmodified lines1151161171181191201211221231241251261271281291305 unmodified lines1361371381391401411421431441451465 unmodified lines1521531541551561571582 unmodified lines1611621631641651661671681691704 unmodified lines1751761771781791801811 unmodified line1831841851861871881891 unmodified line191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308114 unmodified linesdef display_outputs():st.markdown("<div id='top'></div>", unsafe_allow_html=True);client_name = "RMX Creatives"client_website = "https://rmxcreatives.com/"overview = f"""**{client_name}** is a financial services company based in Auckland, New Zealand, specializing in providing quick and flexible loan solutions for businesses and individuals. Represented by Paul Stone, LoansOne has enlisted ShoreMarketing to perform a deep dive into their digital footprint to have a view of the holistic status of their digital properties and determine how each property can play part in implementing a stronger digital marketing plan.\nThe Digital Marketing Footprint consists of deep-dive research by ShoreMarketing specialists to help the business leaders of LoansOne understand the effectiveness of their existing digital initiatives with the view of giving them an insight to developing a strategy and effectively allocating business resources to digital properties that will give them the best results.\nThis document represents the results of our audit of LoansOne’s digital marketing and management practices. Our audit covered reviews of key digital areas: Website and Tools, PPC/SEM, SEO, Social Media, and Market Places."""st.markdown("# Digital Marketing Audit")st.markdown(f"for: **{client_name} ({client_website})**")st.write("")st.write("")st.write("")5 unmodified linesst.markdown("---")st.markdown("### CLIENT FOOTPRINT")st.write("TBD")st.markdown("---")st.markdown("### SNAPSHOT BY CHANNEL")st.write("TBD")st.markdown("---")st.markdown("## AUDITS PER CHANNEL")5 unmodified lineswebsite_and_tools_data = get_analyst_response("Website and Tools Analyst")write_table(website_and_tools_data)st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)st.markdown("---")st.markdown("### SEARCH ENGINE MARKETING/PPC")2 unmodified linesCurrently, {client_name} has already explored numerous online advertising. Its competitors are also experienced in PPC in multiple platforms. """)# Write SEM Tablesem_data = get_analyst_response("SEM/PPC Analyst")write_table(sem_data)st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)st.markdown("---")st.markdown("### SEARCH ENGINE OPTIMIZATION")4 unmodified linesseo_data = get_analyst_response("SEO Analyst")write_table(seo_data)st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)st.markdown("---")# Write On Page Table1 unmodified lineon_page_data = get_analyst_response("On Page Analyst")seo_on_page_table(on_page_data)st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)st.markdown("---")# Write Off Page Table1 unmodified lineon_page_data = get_analyst_response("Off Page Analyst")seo_on_page_table(on_page_data)st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)st.markdown("---")# Write SocMed Tablest.markdown("### SOCIAL MEDIA")st.markdown(f"""Social Media Marketing for the B2B industry is tricky. While B2C businesses can easily have millions of fans through social media, B2B lead generation such as {client_name} sources from a significantly smaller market.Regardless, it is still a great channel worth investing to improve a business’ lead generation if handled correctly. {client_name}, along with its competitors, are found to be using different social media platforms to extend their brand presence. """)social_media_data = get_analyst_response("Social Media Analyst")write_table(social_media_data)st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)st.markdown("---")# Write SocMed Tablest.markdown("### CONTENT")st.markdown(f"""Content is king in digital marketing. People log into the internet to look for and consume information in different formats: text-based, video, audio, or image. Content is what help businesses establish their expertise in the industry, convert leads into customers, guide their customers through their sales funnel, and build relationships with their customers. """)content_data = get_analyst_response("Content Analyst")write_table(content_data)st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)st.markdown("---")if (get_analyst_response("Marketplace Analyst")):st.markdown("### MARKET PLACE")marketpalce_data = get_analyst_response("Marketplace Analyst")write_table(marketpalce_data)st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)st.markdown("---")st.markdown("## OTHER INFORMATION")st.markdown("### DIGITAL MARKETING APPROACH: CUSTOMER CENTRIC INBOUND MARKETING")st.markdown(f"""Digital Marketing is often called in-bound marketing in a sense that it is not intrusive: a person must search for the information before the marketing stimulus is served to them. Unlike the traditional offline marketing which is more brand-centric in style and intrusive (they are served to you even though you did not intend to see the marketing stimulus), digital marketing is customer-centric: it takes into account the needs, thoughts, and considerations of the customer in all stages in the sales funnel while strategically serving them the appropriate content at the right time, at the right frequency, and through the correct channel. We suggest that {client_name} looks into the details below with the view of understanding where the brand’s footing is in some stages in their customer’s decision and buying journey. """)target_market_data = get_analyst_response("Target Market Analyst")st.markdown("##### TARGET MARKET")st.write(target_market_data['target_market'])st.markdown("##### PRODUCT/SERVICE DEMOGRAPHICS")st.write(target_market_data['demographics'])st.markdown("##### MARKETING MESSAGE SUMMARY")st.write(target_market_data['summary'])st.markdown("##### WHAT IS THE DESIRED OUTCOMES OF DIGITAL MARKETING?")st.write("TBD")st.markdown("##### WHAT IS THE PULL-THROUGH OFFER?")st.write(get_analyst_response("Pull through offers Analyst"))st.markdown("##### WEBSITE AUDIENCE ACQUISITION")st.write(get_analyst_response("Website Audience Acquisition Analyst"))#LLD/PM/LNlld_data = get_analyst_response("LLD/PM/LN Analyst")st.markdown("##### LEAD LIST DEVELOPMENT")st.write(lld_data.get('lead_list_development', None))st.markdown("##### PROSPECTING MECHANISM")st.write(lld_data.get('prospecting_mechanism', None))st.markdown("##### LEAD NURTURING")st.write(lld_data.get('lead_nurturing', None))st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)st.markdown("---")st.markdown("#### CONTENT - PROCESS AND ASSETS")st.write(f"""Content is king in digital marketing. People log into the internet to look for and consume information in different formats: text-based, video, audio, or image. Content is what help businesses establish their expertise in the industry, convert leads into customers, guide their customers through their sales funnel, and build relationships with their customers. \nWe have evaluated the process of content development strategy and existing content assets of {client_name} based on how they serve clients throughout the customer journey. """)pna_data = get_analyst_response("Content - Process and Assets Analyst")if pna_data:st.markdown("##### AWARENESS STAGE")st.write(pna_data.get('awareness_stage', 'N/A'))st.markdown("##### CONSIDERATION STAGE")st.write(pna_data.get('consideration_stage', 'N/A'))st.markdown("##### DECISION STAGE")st.write(pna_data.get('decision_stage', 'N/A'))else:st.markdown("##### AWARENESS STAGE")st.write(None)st.markdown("##### CONSIDERATION STAGE")st.write(None)st.markdown("##### DECISION STAGE")st.write(None)st.markdown("---")st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)st.markdown("#### CONVERSION – ACTIVATION OF VISITORS")st.markdown("##### AWARENESS TO TRAFFIC")st.write("TBD")st.markdown("##### TRAFFIC TO LEAD CONVERSION")st.write("TBD")st.markdown("##### LEAD TO SALES CONVERSION")st.write("TBD")st.markdown("##### CONVERSION TO BRAND LOYALTY")st.write("TBD")st.markdown("##### CONNECTION OF ALL ONLINE AND OFFLINE TOUCH POINTS")st.write("TBD")st.markdown("<a href='#top'>Go to top</a>", unsafe_allow_html=True)if st.button("Back to Dashboard", icon="🏠"):st.switch_page("pages/home.py")display_outputs()